| ... | ... | @@ -172,6 +172,7 @@ fn parseContainerMembers(arena: *Allocator, it: *TokenIterator, tree: *Tree) All |
| 172 | 172 | .ExpectedPubItem = .{ .token = it.index }, |
| 173 | 173 | }); |
| 174 | 174 | // ignore this pub |
| 175 | continue; |
| 175 | 176 | } |
| 176 | 177 | |
| 177 | 178 | if (parseContainerField(arena, it, tree) catch |err| switch (err) { |
| ... | ... | @@ -1017,7 +1018,7 @@ fn parsePrimaryExpr(arena: *Allocator, it: *TokenIterator, tree: *Tree) !?*Node |
| 1017 | 1018 | const node = try arena.create(Node.ControlFlowExpression); |
| 1018 | 1019 | node.* = .{ |
| 1019 | 1020 | .ltoken = token, |
| 1020 | | .kind = Node.ControlFlowExpression.Kind{ .Break = label }, |
| 1021 | .kind = .{ .Break = label }, |
| 1021 | 1022 | .rhs = expr_node, |
| 1022 | 1023 | }; |
| 1023 | 1024 | return &node.base; |
| ... | ... | @@ -1053,7 +1054,7 @@ fn parsePrimaryExpr(arena: *Allocator, it: *TokenIterator, tree: *Tree) !?*Node |
| 1053 | 1054 | const node = try arena.create(Node.ControlFlowExpression); |
| 1054 | 1055 | node.* = .{ |
| 1055 | 1056 | .ltoken = token, |
| 1056 | | .kind = Node.ControlFlowExpression.Kind{ .Continue = label }, |
| 1057 | .kind = .{ .Continue = label }, |
| 1057 | 1058 | .rhs = null, |
| 1058 | 1059 | }; |
| 1059 | 1060 | return &node.base; |
| ... | ... | @@ -1077,7 +1078,7 @@ fn parsePrimaryExpr(arena: *Allocator, it: *TokenIterator, tree: *Tree) !?*Node |
| 1077 | 1078 | const node = try arena.create(Node.ControlFlowExpression); |
| 1078 | 1079 | node.* = .{ |
| 1079 | 1080 | .ltoken = token, |
| 1080 | | .kind = Node.ControlFlowExpression.Kind.Return, |
| 1081 | .kind = .Return, |
| 1081 | 1082 | .rhs = expr_node, |
| 1082 | 1083 | }; |
| 1083 | 1084 | return &node.base; |
| ... | ... | @@ -1322,7 +1323,8 @@ fn parseSuffixExpr(arena: *Allocator, it: *TokenIterator, tree: *Tree) !?*Node { |
| 1322 | 1323 | try tree.errors.push(.{ |
| 1323 | 1324 | .ExpectedParamList = .{ .token = it.index }, |
| 1324 | 1325 | }); |
| 1325 | | return null; |
| 1326 | // ignore this, continue parsing |
| 1327 | return res; |
| 1326 | 1328 | }; |
| 1327 | 1329 | const node = try arena.create(Node.SuffixOp); |
| 1328 | 1330 | node.* = .{ |
| ... | ... | @@ -2908,7 +2910,13 @@ fn parseBuiltinCall(arena: *Allocator, it: *TokenIterator, tree: *Tree) !?*Node |
| 2908 | 2910 | try tree.errors.push(.{ |
| 2909 | 2911 | .ExpectedParamList = .{ .token = it.index }, |
| 2910 | 2912 | }); |
| 2911 | | return error.ParseError; |
| 2913 | |
| 2914 | // lets pretend this was an identifier so we can continue parsing |
| 2915 | const node = try arena.create(Node.Identifier); |
| 2916 | node.* = .{ |
| 2917 | .token = token, |
| 2918 | }; |
| 2919 | return &node.base; |
| 2912 | 2920 | }; |
| 2913 | 2921 | const node = try arena.create(Node.BuiltinCall); |
| 2914 | 2922 | node.* = .{ |