mirror of
https://github.com/alecthomas/chroma.git
synced 2025-11-25 22:32:32 +02:00
Tokens by value (#187)
This results in about a 8% improvement in speed.
This commit is contained in:
committed by
Alec Thomas
parent
5a473179cf
commit
9c3abeae1d
@@ -19,7 +19,7 @@ func TestRemappingLexer(t *testing.T) {
|
||||
|
||||
it, err := lexer.Tokenise(nil, `if true then print else end`)
|
||||
assert.NoError(t, err)
|
||||
expected := []*Token{
|
||||
expected := []Token{
|
||||
{Keyword, "if"}, {TextWhitespace, " "}, {Name, "true"}, {TextWhitespace, " "}, {Name, "then"},
|
||||
{TextWhitespace, " "}, {Name, "print"}, {TextWhitespace, " "}, {Keyword, "else"},
|
||||
{TextWhitespace, " "}, {Name, "end"},
|
||||
|
||||
Reference in New Issue
Block a user