basic records support
This commit is contained in:
parent
19011e67da
commit
ff11d7e0ed
11 changed files with 522 additions and 138 deletions
|
|
@ -148,8 +148,8 @@ func TestLexer_NextToken(t *testing.T) {
|
|||
continue
|
||||
}
|
||||
|
||||
if tok.Type != expectedType {
|
||||
t.Errorf("Expected token type '%s' but got '%s'", expectedType, tok.Type)
|
||||
if tok.Kind != expectedType {
|
||||
t.Errorf("Expected token type '%s' but got '%s'", expectedType, tok.Kind)
|
||||
} else {
|
||||
t.Logf("Got expected token type '%s'", expectedType)
|
||||
}
|
||||
|
|
@ -193,7 +193,7 @@ func TestLexer_NextTokenErrors(t *testing.T) {
|
|||
lex := NewLexer(code)
|
||||
tok, err := lex.NextToken()
|
||||
|
||||
for err == nil && tok.Type != TokenEOF {
|
||||
for err == nil && tok.Kind != TokenEOF {
|
||||
tok, err = lex.NextToken()
|
||||
}
|
||||
|
||||
|
|
@ -220,7 +220,7 @@ func BenchmarkLexer_NextToken(b *testing.B) {
|
|||
lex := NewLexer(tc.source)
|
||||
tok, err := lex.NextToken()
|
||||
|
||||
for err == nil && tok.Type != TokenEOF {
|
||||
for err == nil && tok.Kind != TokenEOF {
|
||||
tok, err = lex.NextToken()
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue