generate: Add option token to lexer
This commit is contained in:
@@ -16,6 +16,7 @@ func TestLex(test *testing.T) {
|
||||
// wow
|
||||
0001 Users []User,
|
||||
0002 Followers U32,
|
||||
0003 Wings ?Int,
|
||||
}`))
|
||||
if err != nil { test.Fatal(parse.Format(err)) }
|
||||
|
||||
@@ -42,6 +43,11 @@ func TestLex(test *testing.T) {
|
||||
tok(TokenIdent, "Followers"),
|
||||
tok(TokenIdent, "U32"),
|
||||
tok(TokenComma, ","),
|
||||
tok(TokenKey, "0003"),
|
||||
tok(TokenIdent, "Wings"),
|
||||
tok(TokenOption, "?"),
|
||||
tok(TokenIdent, "Int"),
|
||||
tok(TokenComma, ","),
|
||||
tok(TokenRBrace, "}"),
|
||||
tok(parse.EOF, ""),
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user