also looking at this
Port to latest zig-master
#2
53 files
+1149
-1017
| @@ -657,10 +657,7 @@ pub const Parser = struct { | ||
| 657 | 657 | .dollar => '$', |
| 658 | 658 | .lbracket => '[', // Allow [ as literal (for non-POSIX cases) |
| 659 | 659 | // These should not appear here |
| 660 | .rbracket, .caret, .backslash, | |
| 661 | .escape_d, .escape_D, .escape_w, .escape_W, | |
| 662 | .escape_s, .escape_S, .escape_b, .escape_B, | |
| 663 | .escape_A, .escape_z, .escape_Z, .backref, .eof => null, | |
| 660 | .rbracket, .caret, .backslash, .escape_d, .escape_D, .escape_w, .escape_W, .escape_s, .escape_S, .escape_b, .escape_B, .escape_A, .escape_z, .escape_Z, .backref, .eof => null, | |
| 664 | 661 | }; |
| 665 | 662 | } |
| 666 | 663 | |
| @@ -685,7 +682,8 @@ pub const Parser = struct { | ||
| 685 | 682 | |
| 686 | 683 | if (current_pos + 1 < self.lexer.input.len and |
| 687 | 684 | self.lexer.input[current_pos] == '[' and |
| 688 | self.lexer.input[current_pos + 1] == ':') { | |
| 685 | self.lexer.input[current_pos + 1] == ':') | |
| 686 | { | |
| 689 | 687 | |
| 690 | 688 | // Find the closing :] |
| 691 | 689 | var found_posix = false; |
formatting only · 8 hidden lines
| @@ -693,7 +691,7 @@ pub const Parser = struct { formatting only | ||
| 693 | 691 | while (i + 1 < self.lexer.input.len) : (i += 1) { |
| 694 | 692 | if (self.lexer.input[i] == ':' and self.lexer.input[i + 1] == ']') { |
| 695 | 693 | // Found [:name:] |
| 696 | const class_name = self.lexer.input[current_pos + 2..i]; | |
| 694 | const class_name = self.lexer.input[current_pos + 2 .. i]; | |
| 697 | 695 | |
| 698 | 696 | // Skip to the character AFTER ':]' which should be the outer ']' or more chars |
| 699 | 697 | // We want the lexer to be positioned so that the NEXT token read will be correct |