Removed struct keyword
This commit is contained in:
parent
42e7c8a306
commit
1a2c21de15
18 changed files with 44 additions and 40 deletions
|
@ -74,7 +74,6 @@ const (
|
|||
Import // import
|
||||
Loop // loop
|
||||
Return // return
|
||||
Struct // struct
|
||||
Switch // switch
|
||||
___END_KEYWORDS___ // </keywords>
|
||||
)
|
||||
|
|
|
@ -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,
|
||||
}
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue