Implemented for loops
This commit is contained in:
parent
ac03657307
commit
d26bf9d1a9
16 changed files with 142 additions and 120 deletions
|
@ -25,15 +25,16 @@ func TestFunction(t *testing.T) {
|
|||
}
|
||||
|
||||
func TestKeyword(t *testing.T) {
|
||||
tokens := token.Tokenize([]byte("assert const if import else extern loop return struct switch"))
|
||||
tokens := token.Tokenize([]byte("assert const else extern if import for loop return struct switch"))
|
||||
|
||||
expected := []token.Kind{
|
||||
token.Assert,
|
||||
token.Const,
|
||||
token.If,
|
||||
token.Import,
|
||||
token.Else,
|
||||
token.Extern,
|
||||
token.If,
|
||||
token.Import,
|
||||
token.For,
|
||||
token.Loop,
|
||||
token.Return,
|
||||
token.Struct,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue