5 | | elseif id==TokenId.LBRACK then |
6 | | (tokens, tree) := consume(tokens, tree); |
7 | | (tokens, tree) := expression_list(tokens, tree); |
8 | | while true loop |
9 | | (tokens, tree, b) := scanOpt(tokens, tree, TokenId.SEMICOLON); |
10 | | if not b then |
11 | | break; |
12 | | end if; |
13 | | (tokens, tree) := expression_list(tokens, tree); |
14 | | end while; |
15 | | (tokens, tree) := scan(tokens, tree, TokenId.RBRACK); |
| 5 | elseif id==TokenId.LBRACE then |
| 6 | (tokens, tree) := scan(tokens, tree, TokenId.LBRACE); |
| 7 | (tokens, tree, b) := LA1(tokens, tree, {TokenId.RBRACE}); // Easier than checking First(expression), etc |
| 8 | if not b then |
| 9 | (tokens, tree) := function_arguments(tokens, tree); |
| 10 | end if; |
| 11 | (tokens, tree) := scan(tokens, tree, TokenId.RBRACE); |