Removed struct keyword

This commit is contained in:
Eduard Urbach 2025-04-04 13:32:55 +02:00
parent 42e7c8a306
commit 1a2c21de15
Signed by: eduard
GPG key ID: 49226B848C78F6C8
18 changed files with 44 additions and 40 deletions

View file

@ -74,7 +74,6 @@ const (
Import // import
Loop // loop
Return // return
Struct // struct
Switch // switch
___END_KEYWORDS___ // </keywords>
)

View file

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

View file

@ -31,8 +31,6 @@ func identifier(tokens List, buffer []byte, i Position) (List, Position) {
kind = Loop
case "return":
kind = Return
case "struct":
kind = Struct
case "switch":
kind = Switch
}