1
0
mirror of https://github.com/alecthomas/chroma.git synced 2025-11-23 22:24:39 +02:00

HTML formatter + import all Pygments styles.

This commit is contained in:
Alec Thomas
2017-07-19 23:51:16 -07:00
parent a3862242d5
commit d12529ae61
49 changed files with 1774 additions and 221 deletions

View File

@@ -1,5 +1,16 @@
package chroma
// Scheme is either dark or light.
type Scheme int
// Theme types.
const (
DarkScheme Scheme = iota
LightScheme
)
//go:generate stringer -type TokenType
// TokenType is the type of token to highlight.
//
// It is also an Emitter, emitting a single token of itself
@@ -10,10 +21,14 @@ type TokenType int
// Categories of types are grouped in ranges of 1000, while sub-categories are in ranges of 100. For
// example, the literal category is in the range 3000-3999. The sub-category for literal strings is
// in the range 3100-3199.
// Meta token types.
const (
Escape TokenType = iota
Background TokenType = -1 - iota
Escape
Error
Other
EOF
)
// Keywords.
@@ -44,6 +59,7 @@ const (
NameLabel
NameNamespace
NameOther
NameOperator
NameTag
NameVariable
NameVariableClass