| author | |
| committer | |
| log | 0699b29ce0c5d264bf39c5f88fa6025b61ca6303 |
| tree | b636c8636c199330d77f62122d2f7d9d74d1b50c |
| parent | 8a432436aedd8b10bb837965efe630ce58f89a0b |
2 files changed, 5 insertions(+), 1 deletions(-)
lib/std/zig/Ast.zig+1-1| ... | ... | @@ -66,7 +66,7 @@ pub fn renderToArrayList(tree: Ast, buffer: *std.ArrayList(u8)) RenderError!void |
| 66 | 66 | |
| 67 | 67 | /// Returns an extra offset for column and byte offset of errors that |
| 68 | 68 | /// should point after the token in the error message. |
| 69 | pub fn errorOffset(tree:Ast, error_tag: Error.Tag, token: TokenIndex) u32 { | |
| 69 | pub fn errorOffset(tree: Ast, error_tag: Error.Tag, token: TokenIndex) u32 { | |
| 70 | 70 | return switch (error_tag) { |
| 71 | 71 | .expected_semi_after_decl, |
| 72 | 72 | .expected_semi_after_stmt, |
lib/std/zig/parse.zig+4| ... | ... | @@ -3229,6 +3229,10 @@ const Parser = struct { |
| 3229 | 3229 | .rhs = p.nextToken(), |
| 3230 | 3230 | }, |
| 3231 | 3231 | }), |
| 3232 | .l_brace => { | |
| 3233 | // this a misplaced `.{`, handle the error somewhere else | |
| 3234 | return null_node; | |
| 3235 | }, | |
| 3232 | 3236 | else => { |
| 3233 | 3237 | p.tok_i += 1; |
| 3234 | 3238 | try p.warn(.expected_suffix_op); |