Skip to content

niner/Grammar-Highlighter

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
t
 
 
 
 
 
 
 
 
 
 
 
 

TITLE

Grammar::Highlighter

SYNOPSIS

    use Grammar::Highlighter;
    use Whatever::Grammar::You::Like;

    my $highlighter = Grammar::Highlighter.new;
    my $parser = Whatever::Grammar::You::Like.new;
    say $parser.parse($string, :actions($highlighter)).ast.Str;

DESCRIPTION

Get automatic syntax highlighting for any grammar you provide.

Grammar::Highlighter is a generic syntax highlighter. You use it as an actions object for a grammar's parse method. It will assign a different color to all the grammar's tokens, rules and regexes. The generated parse tree stringifies to the original string with colors applied.

AUTHOR

Stefan Seifert nine@detonation.org

About

Fully automatic syntax highlighting for any grammar

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages

  • Other 100.0%