4 revisions Comment about keywords

Fast Go syntax highlighter library #

gosyntax is a library for lexing and rendering syntax highlighted source code. It's optimized for performance and rendering diffs of large files. It's built to power syntax highlighting on Git ‘n’ Coffee.

Features #

This library does not use regexes. Instead, it tokenizes the file and splits it into primary ranges: comments, strings and embedded blocks or tags. Those identify where different types of content are located. For best performance, at this stage it does not parse or look for any other tokens.

Keywords and other tokens can only be parsed and highlighted on lines that are actually rendered.

Supported Languages #

List of languages is work in progress and many more will be added soon.

  • C
  • JavaScript
  • HTML
  • CSS
  • Go

License #

MIT