| author | |
| committer | |
| log | 9014daedbbb0630ee438ab64302dd0e0697759ba |
| tree | 740b7ded320a70975a2ca1721cb4330191dc8bf3 |
| parent | 409541bc77cb1d6a447dbcdf74f9fcbc2a8b0397 |
2 files changed, 11 insertions(+), 1 deletions(-)
lib/std/zig/Ast/Render.zig+1-1| ... | ... | @@ -3167,7 +3167,7 @@ fn renderIdentifier(r: *Render, token_index: Ast.TokenIndex, space: Space, quote |
| 3167 | 3167 | }, |
| 3168 | 3168 | .failure => return renderQuotedIdentifier(r, token_index, space, false), |
| 3169 | 3169 | } |
| 3170 | contents_i += esc_offset; | |
| 3170 | contents_i = esc_offset; | |
| 3171 | 3171 | continue; |
| 3172 | 3172 | }, |
| 3173 | 3173 | else => return renderQuotedIdentifier(r, token_index, space, false), |
lib/std/zig/parser_test.zig+10| ... | ... | @@ -6086,6 +6086,16 @@ test "zig fmt: seperate errors in error sets with comments" { |
| 6086 | 6086 | ); |
| 6087 | 6087 | } |
| 6088 | 6088 | |
| 6089 | test "zig fmt: proper escape checks" { | |
| 6090 | try testTransform( | |
| 6091 | \\@"\x41\x42\!" | |
| 6092 | \\ | |
| 6093 | , | |
| 6094 | \\@"AB\\!" | |
| 6095 | \\ | |
| 6096 | ); | |
| 6097 | } | |
| 6098 | ||
| 6089 | 6099 | test "zig fmt: field accesses on number literals" { |
| 6090 | 6100 | try testCanonical( |
| 6091 | 6101 | \\const a = 0xF .A; |