Implemented struct parser

This commit is contained in:
Eduard Urbach 2025-02-04 14:41:04 +01:00
parent 00e7216256
commit 30940f0100
Signed by: eduard
GPG key ID: 49226B848C78F6C8
19 changed files with 388 additions and 252 deletions

View file

@ -25,7 +25,7 @@ func TestFunction(t *testing.T) {
}
func TestKeyword(t *testing.T) {
tokens := token.Tokenize([]byte("assert if import else loop return switch"))
tokens := token.Tokenize([]byte("assert if import else loop return struct switch"))
expected := []token.Kind{
token.Assert,
@ -34,6 +34,7 @@ func TestKeyword(t *testing.T) {
token.Else,
token.Loop,
token.Return,
token.Struct,
token.Switch,
token.EOF,
}