mirror of
https://github.com/alecthomas/chroma.git
synced 2025-11-27 22:38:42 +02:00
Use pointers to tokens + support regex flags in importer.
This commit is contained in:
4
types.go
4
types.go
@@ -182,6 +182,6 @@ func (t TokenType) InSubCategory(other TokenType) bool {
|
||||
return t/100 == other/100
|
||||
}
|
||||
|
||||
func (t TokenType) Emit(groups []string, lexer Lexer, out func(Token)) {
|
||||
out(Token{Type: t, Value: groups[0]})
|
||||
func (t TokenType) Emit(groups []string, lexer Lexer, out func(*Token)) {
|
||||
out(&Token{Type: t, Value: groups[0]})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user