basic records support
All checks were successful
/ test (push) Successful in 50s

This commit is contained in:
Neemek 2026-08-17 17:08:24 +02:00
parent db3a3e29eb
commit 42fa039daf
11 changed files with 522 additions and 138 deletions

View file

@ -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()
}
}