| ... | @@ -10,16 +10,291 @@ const max_depth = 5; | ... | @@ -10,16 +10,291 @@ const max_depth = 5; |
| 10 | /// the grammar. | 10 | /// the grammar. |
| 11 | /// Returns error.MaxDepth if more than `max_depth` levels of recursion/iteration are reached. | 11 | /// Returns error.MaxDepth if more than `max_depth` levels of recursion/iteration are reached. |
| 12 | pub fn parse(source: []const u8) Error!bool { | 12 | pub fn parse(source: []const u8) Error!bool { |
| 13 | var p: Parser = .{ .source = source, .i = 0, .expr_depth = 1, .block_depth = 1 }; | 13 | var p: Parser = .{ .source = source, .i = 0, .depths = @splat(1) }; |
| 14 | return p.parseRoot(); | 14 | return p.parseRoot(); |
| 15 | } | 15 | } |
| 16 | | 16 | const Def = enum { |
| | 17 | defRoot, |
| | 18 | defContainerMembers, |
| | 19 | defContainerDecl, |
| | 20 | defContainerDeclPrefix, |
| | 21 | defTestDecl, |
| | 22 | defComptimeDecl, |
| | 23 | defDecl, |
| | 24 | defDeclPrefix, |
| | 25 | defFnProto, |
| | 26 | defVarDeclProto, |
| | 27 | defGlobalVarDecl, |
| | 28 | defContainerField, |
| | 29 | defBlockStatement, |
| | 30 | defStatement, |
| | 31 | defStatementPrefix, |
| | 32 | defIfStatement, |
| | 33 | defLabeledStatement, |
| | 34 | defLoopStatement, |
| | 35 | defForStatement, |
| | 36 | defWhileStatement, |
| | 37 | defBlockExprStatement, |
| | 38 | defBlockExprPrefix, |
| | 39 | defBlockExpr, |
| | 40 | defVarAssignStatement, |
| | 41 | defAssignExpr, |
| | 42 | defSingleAssignExpr, |
| | 43 | defExpr, |
| | 44 | defBoolOrExpr, |
| | 45 | defBoolAndExpr, |
| | 46 | defCompareExpr, |
| | 47 | defBitwiseExpr, |
| | 48 | defBitShiftExpr, |
| | 49 | defAdditionExpr, |
| | 50 | defMultiplyExpr, |
| | 51 | defPrefixExpr, |
| | 52 | defPrimaryExpr, |
| | 53 | defIfExpr, |
| | 54 | defBlock, |
| | 55 | defLoopExpr, |
| | 56 | defForExpr, |
| | 57 | defWhileExpr, |
| | 58 | defCurlySuffixExpr, |
| | 59 | defInitList, |
| | 60 | defTypeExpr, |
| | 61 | defErrorUnionExpr, |
| | 62 | defSuffixExpr, |
| | 63 | defPrimaryTypeExpr, |
| | 64 | defContainerType, |
| | 65 | defErrorSetDecl, |
| | 66 | defGroupedExpr, |
| | 67 | defIfTypeExpr, |
| | 68 | defLabeledTypeExpr, |
| | 69 | defLoopTypeExpr, |
| | 70 | defForTypeExpr, |
| | 71 | defWhileTypeExpr, |
| | 72 | defSwitchExpr, |
| | 73 | defAsmExpr, |
| | 74 | defAsmOutput, |
| | 75 | defAsmOutputItem, |
| | 76 | defAsmInput, |
| | 77 | defAsmInputItem, |
| | 78 | defAsmClobbers, |
| | 79 | defBreakLabel, |
| | 80 | defBlockLabel, |
| | 81 | defFieldInit, |
| | 82 | defWhileContinueExpr, |
| | 83 | defLinkSection, |
| | 84 | defAddrSpace, |
| | 85 | defCallConv, |
| | 86 | defParamDecl, |
| | 87 | defParamType, |
| | 88 | defIfPrefix, |
| | 89 | defWhilePrefix, |
| | 90 | defForPrefix, |
| | 91 | defPayload, |
| | 92 | defPtrPayload, |
| | 93 | defPtrIndexPayload, |
| | 94 | defPtrListPayload, |
| | 95 | defSwitchProng, |
| | 96 | defSwitchCase, |
| | 97 | defSwitchItem, |
| | 98 | defForArgumentsList, |
| | 99 | defForItem, |
| | 100 | defAssignOp, |
| | 101 | defOrOp, |
| | 102 | defAndOp, |
| | 103 | defCompareOp, |
| | 104 | defCompareOpTok, |
| | 105 | defBitwiseOp, |
| | 106 | defBitwiseOpTok, |
| | 107 | defBitShiftOp, |
| | 108 | defBitShiftOpTok, |
| | 109 | defAdditionOp, |
| | 110 | defAdditionOpTok, |
| | 111 | defMultiplyOp, |
| | 112 | defMultiplyOpTok, |
| | 113 | defPrefixOp, |
| | 114 | defPrefixTypeOp, |
| | 115 | defPtrMods, |
| | 116 | defSinglePtrMods, |
| | 117 | defPtrMod, |
| | 118 | defPrefixTypeOpPrefix, |
| | 119 | defSuffixOp, |
| | 120 | defSuffixOpPrefix, |
| | 121 | defFnCallArguments, |
| | 122 | defSliceTypeStart, |
| | 123 | defSinglePtrTypeStart, |
| | 124 | defManyPtrTypeStart, |
| | 125 | defArrayTypeStart, |
| | 126 | defContainerTypeAuto, |
| | 127 | defContainerTypeKind, |
| | 128 | defByteAlign, |
| | 129 | defBitAlign, |
| | 130 | defIdentifierList, |
| | 131 | defSwitchProngList, |
| | 132 | defAsmOutputList, |
| | 133 | defAsmInputList, |
| | 134 | defParamDeclList, |
| | 135 | defParamDeclListRest, |
| | 136 | defExprList, |
| | 137 | defExprPrefix, |
| | 138 | defbyte_order_mark, |
| | 139 | defsof, |
| | 140 | defeof, |
| | 141 | defox80_oxBF, |
| | 142 | defoxF4, |
| | 143 | defox80_ox8F, |
| | 144 | defoxF1_oxF3, |
| | 145 | defoxF0, |
| | 146 | defox90_0xBF, |
| | 147 | defoxEE_oxEF, |
| | 148 | defoxED, |
| | 149 | defox80_ox9F, |
| | 150 | defoxE1_oxEC, |
| | 151 | defoxE0, |
| | 152 | defoxA0_oxBF, |
| | 153 | defoxC2_oxDF, |
| | 154 | defmultibyte_utf8, |
| | 155 | defnon_control_ascii, |
| | 156 | defnon_control_utf8, |
| | 157 | defchar_char, |
| | 158 | defstring_char, |
| | 159 | defcontainer_doc_comment, |
| | 160 | defdoc_comment, |
| | 161 | defline_comment, |
| | 162 | defline_string, |
| | 163 | defnewline, |
| | 164 | defskip, |
| | 165 | defskip_require_newline, |
| | 166 | defpre_op_white, |
| | 167 | defpost_op_white, |
| | 168 | defCHAR_LITERAL, |
| | 169 | defdigit, |
| | 170 | defdigit_int, |
| | 171 | defdigit_float, |
| | 172 | defNUMBERLITERAL, |
| | 173 | defstring, |
| | 174 | defSTRINGLITERALSINGLE, |
| | 175 | defSTRINGLITERAL, |
| | 176 | defIDENTIFIER, |
| | 177 | defBUILTINIDENTIFIER, |
| | 178 | defAMPERSAND, |
| | 179 | defAMPERSANDEQUAL, |
| | 180 | defASTERISK, |
| | 181 | defASTERISKEQUAL, |
| | 182 | defASTERISKPERCENT, |
| | 183 | defASTERISKPERCENTEQUAL, |
| | 184 | defASTERISKPIPE, |
| | 185 | defASTERISKPIPEEQUAL, |
| | 186 | defCARET, |
| | 187 | defCARETEQUAL, |
| | 188 | defCOLON, |
| | 189 | defCOMMA, |
| | 190 | defDOT, |
| | 191 | defDOT2, |
| | 192 | defDOT3, |
| | 193 | defDOTASTERISK, |
| | 194 | defEQUAL, |
| | 195 | defEQUALEQUAL, |
| | 196 | defEQUALRARROW, |
| | 197 | defEXCLAMATIONMARK, |
| | 198 | defEXCLAMATIONMARKEQUAL, |
| | 199 | defLARROW, |
| | 200 | defLARROW2, |
| | 201 | defLARROW2EQUAL, |
| | 202 | defLARROW2PIPE, |
| | 203 | defLARROW2PIPEEQUAL, |
| | 204 | defLARROWEQUAL, |
| | 205 | defLBRACE, |
| | 206 | defLBRACKET, |
| | 207 | defLPAREN, |
| | 208 | defMINUS, |
| | 209 | defMINUSEQUAL, |
| | 210 | defMINUSPERCENT, |
| | 211 | defMINUSPERCENTEQUAL, |
| | 212 | defMINUSPIPE, |
| | 213 | defMINUSPIPEEQUAL, |
| | 214 | defMINUSRARROW, |
| | 215 | defPERCENT, |
| | 216 | defPERCENTEQUAL, |
| | 217 | defPIPE, |
| | 218 | defPIPE2, |
| | 219 | defPIPEEQUAL, |
| | 220 | defPLUS, |
| | 221 | defPLUS2, |
| | 222 | defPLUSEQUAL, |
| | 223 | defPLUSPERCENT, |
| | 224 | defPLUSPERCENTEQUAL, |
| | 225 | defPLUSPIPE, |
| | 226 | defPLUSPIPEEQUAL, |
| | 227 | defLETTERC, |
| | 228 | defQUESTIONMARK, |
| | 229 | defRARROW, |
| | 230 | defRARROW2, |
| | 231 | defRARROW2EQUAL, |
| | 232 | defRARROWEQUAL, |
| | 233 | defRBRACE, |
| | 234 | defRBRACKET, |
| | 235 | defRPAREN, |
| | 236 | defSEMICOLON, |
| | 237 | defSLASH, |
| | 238 | defSLASHEQUAL, |
| | 239 | defTILDE, |
| | 240 | defend_of_word, |
| | 241 | defKEYWORD_addrspace, |
| | 242 | defKEYWORD_align, |
| | 243 | defKEYWORD_allowzero, |
| | 244 | defKEYWORD_and, |
| | 245 | defKEYWORD_anyframe, |
| | 246 | defKEYWORD_anytype, |
| | 247 | defKEYWORD_asm, |
| | 248 | defKEYWORD_break, |
| | 249 | defKEYWORD_callconv, |
| | 250 | defKEYWORD_catch, |
| | 251 | defKEYWORD_comptime, |
| | 252 | defKEYWORD_const, |
| | 253 | defKEYWORD_continue, |
| | 254 | defKEYWORD_defer, |
| | 255 | defKEYWORD_else, |
| | 256 | defKEYWORD_enum, |
| | 257 | defKEYWORD_errdefer, |
| | 258 | defKEYWORD_error, |
| | 259 | defKEYWORD_export, |
| | 260 | defKEYWORD_extern, |
| | 261 | defKEYWORD_fn, |
| | 262 | defKEYWORD_for, |
| | 263 | defKEYWORD_if, |
| | 264 | defKEYWORD_inline, |
| | 265 | defKEYWORD_noalias, |
| | 266 | defKEYWORD_nosuspend, |
| | 267 | defKEYWORD_noinline, |
| | 268 | defKEYWORD_opaque, |
| | 269 | defKEYWORD_or, |
| | 270 | defKEYWORD_orelse, |
| | 271 | defKEYWORD_packed, |
| | 272 | defKEYWORD_pub, |
| | 273 | defKEYWORD_resume, |
| | 274 | defKEYWORD_return, |
| | 275 | defKEYWORD_linksection, |
| | 276 | defKEYWORD_struct, |
| | 277 | defKEYWORD_suspend, |
| | 278 | defKEYWORD_switch, |
| | 279 | defKEYWORD_test, |
| | 280 | defKEYWORD_threadlocal, |
| | 281 | defKEYWORD_try, |
| | 282 | defKEYWORD_union, |
| | 283 | defKEYWORD_unreachable, |
| | 284 | defKEYWORD_var, |
| | 285 | defKEYWORD_volatile, |
| | 286 | defKEYWORD_while, |
| | 287 | defkeyword, |
| | 288 | }; |
| 17 | const Parser = struct { | 289 | const Parser = struct { |
| 18 | source: []const u8, | 290 | source: []const u8, |
| 19 | i: usize, | 291 | i: usize, |
| 20 | expr_depth: usize, | 292 | depths: [271]u8, |
| 21 | block_depth: usize, | | |
| 22 | pub fn parseRoot(p: *Parser) Error!bool { | 293 | pub fn parseRoot(p: *Parser) Error!bool { |
| | 294 | const def_index = @intFromEnum(Def.defRoot); |
| | 295 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 296 | p.depths[def_index] += 1; |
| | 297 | defer p.depths[def_index] -= 1; |
| 23 | return blk_0: { | 298 | return blk_0: { |
| 24 | const pos_0 = p.i; | 299 | const pos_0 = p.i; |
| 25 | if (try p.parseContainerMembers() and try p.parseskip() and try p.parseeof()) break :blk_0 true; | 300 | if (try p.parseContainerMembers() and try p.parseskip() and try p.parseeof()) break :blk_0 true; |
| ... | @@ -28,6 +303,10 @@ const Parser = struct { | ... | @@ -28,6 +303,10 @@ const Parser = struct { |
| 28 | }; | 303 | }; |
| 29 | } | 304 | } |
| 30 | pub fn parseContainerMembers(p: *Parser) Error!bool { | 305 | pub fn parseContainerMembers(p: *Parser) Error!bool { |
| | 306 | const def_index = @intFromEnum(Def.defContainerMembers); |
| | 307 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 308 | p.depths[def_index] += 1; |
| | 309 | defer p.depths[def_index] -= 1; |
| 31 | return blk_0: { | 310 | return blk_0: { |
| 32 | const pos_0 = p.i; | 311 | const pos_0 = p.i; |
| 33 | if ((try p.parsecontainer_doc_comment() or true) and blk_1: { | 312 | if ((try p.parsecontainer_doc_comment() or true) and blk_1: { |
| ... | @@ -84,6 +363,10 @@ const Parser = struct { | ... | @@ -84,6 +363,10 @@ const Parser = struct { |
| 84 | }; | 363 | }; |
| 85 | } | 364 | } |
| 86 | pub fn parseContainerDecl(p: *Parser) Error!bool { | 365 | pub fn parseContainerDecl(p: *Parser) Error!bool { |
| | 366 | const def_index = @intFromEnum(Def.defContainerDecl); |
| | 367 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 368 | p.depths[def_index] += 1; |
| | 369 | defer p.depths[def_index] -= 1; |
| 87 | return blk_0: { | 370 | return blk_0: { |
| 88 | const pos_0 = p.i; | 371 | const pos_0 = p.i; |
| 89 | if (try p.parseTestDecl()) break :blk_0 true; | 372 | if (try p.parseTestDecl()) break :blk_0 true; |
| ... | @@ -96,6 +379,10 @@ const Parser = struct { | ... | @@ -96,6 +379,10 @@ const Parser = struct { |
| 96 | }; | 379 | }; |
| 97 | } | 380 | } |
| 98 | pub fn parseContainerDeclPrefix(p: *Parser) Error!bool { | 381 | pub fn parseContainerDeclPrefix(p: *Parser) Error!bool { |
| | 382 | const def_index = @intFromEnum(Def.defContainerDeclPrefix); |
| | 383 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 384 | p.depths[def_index] += 1; |
| | 385 | defer p.depths[def_index] -= 1; |
| 99 | return blk_0: { | 386 | return blk_0: { |
| 100 | const pos_0 = p.i; | 387 | const pos_0 = p.i; |
| 101 | if (try p.parseKEYWORD_test()) break :blk_0 true; | 388 | if (try p.parseKEYWORD_test()) break :blk_0 true; |
| ... | @@ -108,6 +395,10 @@ const Parser = struct { | ... | @@ -108,6 +395,10 @@ const Parser = struct { |
| 108 | }; | 395 | }; |
| 109 | } | 396 | } |
| 110 | pub fn parseTestDecl(p: *Parser) Error!bool { | 397 | pub fn parseTestDecl(p: *Parser) Error!bool { |
| | 398 | const def_index = @intFromEnum(Def.defTestDecl); |
| | 399 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 400 | p.depths[def_index] += 1; |
| | 401 | defer p.depths[def_index] -= 1; |
| 111 | return blk_0: { | 402 | return blk_0: { |
| 112 | const pos_0 = p.i; | 403 | const pos_0 = p.i; |
| 113 | if (try p.parseKEYWORD_test() and (blk_3: { | 404 | if (try p.parseKEYWORD_test() and (blk_3: { |
| ... | @@ -123,6 +414,10 @@ const Parser = struct { | ... | @@ -123,6 +414,10 @@ const Parser = struct { |
| 123 | }; | 414 | }; |
| 124 | } | 415 | } |
| 125 | pub fn parseComptimeDecl(p: *Parser) Error!bool { | 416 | pub fn parseComptimeDecl(p: *Parser) Error!bool { |
| | 417 | const def_index = @intFromEnum(Def.defComptimeDecl); |
| | 418 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 419 | p.depths[def_index] += 1; |
| | 420 | defer p.depths[def_index] -= 1; |
| 126 | return blk_0: { | 421 | return blk_0: { |
| 127 | const pos_0 = p.i; | 422 | const pos_0 = p.i; |
| 128 | if (try p.parseKEYWORD_comptime() and try p.parseBlock()) break :blk_0 true; | 423 | if (try p.parseKEYWORD_comptime() and try p.parseBlock()) break :blk_0 true; |
| ... | @@ -131,6 +426,10 @@ const Parser = struct { | ... | @@ -131,6 +426,10 @@ const Parser = struct { |
| 131 | }; | 426 | }; |
| 132 | } | 427 | } |
| 133 | pub fn parseDecl(p: *Parser) Error!bool { | 428 | pub fn parseDecl(p: *Parser) Error!bool { |
| | 429 | const def_index = @intFromEnum(Def.defDecl); |
| | 430 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 431 | p.depths[def_index] += 1; |
| | 432 | defer p.depths[def_index] -= 1; |
| 134 | return blk_0: { | 433 | return blk_0: { |
| 135 | const pos_0 = p.i; | 434 | const pos_0 = p.i; |
| 136 | if ((blk_3: { | 435 | if ((blk_3: { |
| ... | @@ -166,6 +465,10 @@ const Parser = struct { | ... | @@ -166,6 +465,10 @@ const Parser = struct { |
| 166 | }; | 465 | }; |
| 167 | } | 466 | } |
| 168 | pub fn parseDeclPrefix(p: *Parser) Error!bool { | 467 | pub fn parseDeclPrefix(p: *Parser) Error!bool { |
| | 468 | const def_index = @intFromEnum(Def.defDeclPrefix); |
| | 469 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 470 | p.depths[def_index] += 1; |
| | 471 | defer p.depths[def_index] -= 1; |
| 169 | return blk_0: { | 472 | return blk_0: { |
| 170 | const pos_0 = p.i; | 473 | const pos_0 = p.i; |
| 171 | if ((blk_3: { | 474 | if ((blk_3: { |
| ... | @@ -201,6 +504,10 @@ const Parser = struct { | ... | @@ -201,6 +504,10 @@ const Parser = struct { |
| 201 | }; | 504 | }; |
| 202 | } | 505 | } |
| 203 | pub fn parseFnProto(p: *Parser) Error!bool { | 506 | pub fn parseFnProto(p: *Parser) Error!bool { |
| | 507 | const def_index = @intFromEnum(Def.defFnProto); |
| | 508 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 509 | p.depths[def_index] += 1; |
| | 510 | defer p.depths[def_index] -= 1; |
| 204 | return blk_0: { | 511 | return blk_0: { |
| 205 | const pos_0 = p.i; | 512 | const pos_0 = p.i; |
| 206 | if (try p.parseKEYWORD_fn() and (try p.parseIDENTIFIER() or true) and try p.parseParamDeclList() and (try p.parseByteAlign() or true) and (try p.parseAddrSpace() or true) and (try p.parseLinkSection() or true) and (try p.parseCallConv() or true) and (try p.parseEXCLAMATIONMARK() or true) and try p.parseTypeExpr()) break :blk_0 true; | 513 | if (try p.parseKEYWORD_fn() and (try p.parseIDENTIFIER() or true) and try p.parseParamDeclList() and (try p.parseByteAlign() or true) and (try p.parseAddrSpace() or true) and (try p.parseLinkSection() or true) and (try p.parseCallConv() or true) and (try p.parseEXCLAMATIONMARK() or true) and try p.parseTypeExpr()) break :blk_0 true; |
| ... | @@ -209,6 +516,10 @@ const Parser = struct { | ... | @@ -209,6 +516,10 @@ const Parser = struct { |
| 209 | }; | 516 | }; |
| 210 | } | 517 | } |
| 211 | pub fn parseVarDeclProto(p: *Parser) Error!bool { | 518 | pub fn parseVarDeclProto(p: *Parser) Error!bool { |
| | 519 | const def_index = @intFromEnum(Def.defVarDeclProto); |
| | 520 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 521 | p.depths[def_index] += 1; |
| | 522 | defer p.depths[def_index] -= 1; |
| 212 | return blk_0: { | 523 | return blk_0: { |
| 213 | const pos_0 = p.i; | 524 | const pos_0 = p.i; |
| 214 | if (blk_2: { | 525 | if (blk_2: { |
| ... | @@ -229,6 +540,10 @@ const Parser = struct { | ... | @@ -229,6 +540,10 @@ const Parser = struct { |
| 229 | }; | 540 | }; |
| 230 | } | 541 | } |
| 231 | pub fn parseGlobalVarDecl(p: *Parser) Error!bool { | 542 | pub fn parseGlobalVarDecl(p: *Parser) Error!bool { |
| | 543 | const def_index = @intFromEnum(Def.defGlobalVarDecl); |
| | 544 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 545 | p.depths[def_index] += 1; |
| | 546 | defer p.depths[def_index] -= 1; |
| 232 | return blk_0: { | 547 | return blk_0: { |
| 233 | const pos_0 = p.i; | 548 | const pos_0 = p.i; |
| 234 | if (try p.parseVarDeclProto() and (blk_3: { | 549 | if (try p.parseVarDeclProto() and (blk_3: { |
| ... | @@ -242,6 +557,10 @@ const Parser = struct { | ... | @@ -242,6 +557,10 @@ const Parser = struct { |
| 242 | }; | 557 | }; |
| 243 | } | 558 | } |
| 244 | pub fn parseContainerField(p: *Parser) Error!bool { | 559 | pub fn parseContainerField(p: *Parser) Error!bool { |
| | 560 | const def_index = @intFromEnum(Def.defContainerField); |
| | 561 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 562 | p.depths[def_index] += 1; |
| | 563 | defer p.depths[def_index] -= 1; |
| 245 | return blk_0: { | 564 | return blk_0: { |
| 246 | const pos_0 = p.i; | 565 | const pos_0 = p.i; |
| 247 | if ((try p.parsedoc_comment() or true) and (try p.parseKEYWORD_comptime() or true) and (blk_3: { | 566 | if ((try p.parsedoc_comment() or true) and (try p.parseKEYWORD_comptime() or true) and (blk_3: { |
| ... | @@ -260,6 +579,10 @@ const Parser = struct { | ... | @@ -260,6 +579,10 @@ const Parser = struct { |
| 260 | }; | 579 | }; |
| 261 | } | 580 | } |
| 262 | pub fn parseBlockStatement(p: *Parser) Error!bool { | 581 | pub fn parseBlockStatement(p: *Parser) Error!bool { |
| | 582 | const def_index = @intFromEnum(Def.defBlockStatement); |
| | 583 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 584 | p.depths[def_index] += 1; |
| | 585 | defer p.depths[def_index] -= 1; |
| 263 | return blk_0: { | 586 | return blk_0: { |
| 264 | const pos_0 = p.i; | 587 | const pos_0 = p.i; |
| 265 | if (try p.parseStatement()) break :blk_0 true; | 588 | if (try p.parseStatement()) break :blk_0 true; |
| ... | @@ -279,6 +602,10 @@ const Parser = struct { | ... | @@ -279,6 +602,10 @@ const Parser = struct { |
| 279 | }; | 602 | }; |
| 280 | } | 603 | } |
| 281 | pub fn parseStatement(p: *Parser) Error!bool { | 604 | pub fn parseStatement(p: *Parser) Error!bool { |
| | 605 | const def_index = @intFromEnum(Def.defStatement); |
| | 606 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 607 | p.depths[def_index] += 1; |
| | 608 | defer p.depths[def_index] -= 1; |
| 282 | return blk_0: { | 609 | return blk_0: { |
| 283 | const pos_0 = p.i; | 610 | const pos_0 = p.i; |
| 284 | if (try p.parseIfStatement()) break :blk_0 true; | 611 | if (try p.parseIfStatement()) break :blk_0 true; |
| ... | @@ -302,6 +629,10 @@ const Parser = struct { | ... | @@ -302,6 +629,10 @@ const Parser = struct { |
| 302 | }; | 629 | }; |
| 303 | } | 630 | } |
| 304 | pub fn parseStatementPrefix(p: *Parser) Error!bool { | 631 | pub fn parseStatementPrefix(p: *Parser) Error!bool { |
| | 632 | const def_index = @intFromEnum(Def.defStatementPrefix); |
| | 633 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 634 | p.depths[def_index] += 1; |
| | 635 | defer p.depths[def_index] -= 1; |
| 305 | return blk_0: { | 636 | return blk_0: { |
| 306 | const pos_0 = p.i; | 637 | const pos_0 = p.i; |
| 307 | if (try p.parseKEYWORD_if()) break :blk_0 true; | 638 | if (try p.parseKEYWORD_if()) break :blk_0 true; |
| ... | @@ -332,6 +663,10 @@ const Parser = struct { | ... | @@ -332,6 +663,10 @@ const Parser = struct { |
| 332 | }; | 663 | }; |
| 333 | } | 664 | } |
| 334 | pub fn parseIfStatement(p: *Parser) Error!bool { | 665 | pub fn parseIfStatement(p: *Parser) Error!bool { |
| | 666 | const def_index = @intFromEnum(Def.defIfStatement); |
| | 667 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 668 | p.depths[def_index] += 1; |
| | 669 | defer p.depths[def_index] -= 1; |
| 335 | return blk_0: { | 670 | return blk_0: { |
| 336 | const pos_0 = p.i; | 671 | const pos_0 = p.i; |
| 337 | if (try p.parseIfPrefix() and try p.parseBlockExpr() and blk_2: { | 672 | if (try p.parseIfPrefix() and try p.parseBlockExpr() and blk_2: { |
| ... | @@ -366,6 +701,10 @@ const Parser = struct { | ... | @@ -366,6 +701,10 @@ const Parser = struct { |
| 366 | }; | 701 | }; |
| 367 | } | 702 | } |
| 368 | pub fn parseLabeledStatement(p: *Parser) Error!bool { | 703 | pub fn parseLabeledStatement(p: *Parser) Error!bool { |
| | 704 | const def_index = @intFromEnum(Def.defLabeledStatement); |
| | 705 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 706 | p.depths[def_index] += 1; |
| | 707 | defer p.depths[def_index] -= 1; |
| 369 | return blk_0: { | 708 | return blk_0: { |
| 370 | const pos_0 = p.i; | 709 | const pos_0 = p.i; |
| 371 | if ((try p.parseBlockLabel() or true) and blk_2: { | 710 | if ((try p.parseBlockLabel() or true) and blk_2: { |
| ... | @@ -383,6 +722,10 @@ const Parser = struct { | ... | @@ -383,6 +722,10 @@ const Parser = struct { |
| 383 | }; | 722 | }; |
| 384 | } | 723 | } |
| 385 | pub fn parseLoopStatement(p: *Parser) Error!bool { | 724 | pub fn parseLoopStatement(p: *Parser) Error!bool { |
| | 725 | const def_index = @intFromEnum(Def.defLoopStatement); |
| | 726 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 727 | p.depths[def_index] += 1; |
| | 728 | defer p.depths[def_index] -= 1; |
| 386 | return blk_0: { | 729 | return blk_0: { |
| 387 | const pos_0 = p.i; | 730 | const pos_0 = p.i; |
| 388 | if ((try p.parseKEYWORD_inline() or true) and blk_2: { | 731 | if ((try p.parseKEYWORD_inline() or true) and blk_2: { |
| ... | @@ -398,6 +741,10 @@ const Parser = struct { | ... | @@ -398,6 +741,10 @@ const Parser = struct { |
| 398 | }; | 741 | }; |
| 399 | } | 742 | } |
| 400 | pub fn parseForStatement(p: *Parser) Error!bool { | 743 | pub fn parseForStatement(p: *Parser) Error!bool { |
| | 744 | const def_index = @intFromEnum(Def.defForStatement); |
| | 745 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 746 | p.depths[def_index] += 1; |
| | 747 | defer p.depths[def_index] -= 1; |
| 401 | return blk_0: { | 748 | return blk_0: { |
| 402 | const pos_0 = p.i; | 749 | const pos_0 = p.i; |
| 403 | if (try p.parseForPrefix() and try p.parseBlockExpr() and blk_2: { | 750 | if (try p.parseForPrefix() and try p.parseBlockExpr() and blk_2: { |
| ... | @@ -432,6 +779,10 @@ const Parser = struct { | ... | @@ -432,6 +779,10 @@ const Parser = struct { |
| 432 | }; | 779 | }; |
| 433 | } | 780 | } |
| 434 | pub fn parseWhileStatement(p: *Parser) Error!bool { | 781 | pub fn parseWhileStatement(p: *Parser) Error!bool { |
| | 782 | const def_index = @intFromEnum(Def.defWhileStatement); |
| | 783 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 784 | p.depths[def_index] += 1; |
| | 785 | defer p.depths[def_index] -= 1; |
| 435 | return blk_0: { | 786 | return blk_0: { |
| 436 | const pos_0 = p.i; | 787 | const pos_0 = p.i; |
| 437 | if (try p.parseWhilePrefix() and try p.parseBlockExpr() and blk_2: { | 788 | if (try p.parseWhilePrefix() and try p.parseBlockExpr() and blk_2: { |
| ... | @@ -466,6 +817,10 @@ const Parser = struct { | ... | @@ -466,6 +817,10 @@ const Parser = struct { |
| 466 | }; | 817 | }; |
| 467 | } | 818 | } |
| 468 | pub fn parseBlockExprStatement(p: *Parser) Error!bool { | 819 | pub fn parseBlockExprStatement(p: *Parser) Error!bool { |
| | 820 | const def_index = @intFromEnum(Def.defBlockExprStatement); |
| | 821 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 822 | p.depths[def_index] += 1; |
| | 823 | defer p.depths[def_index] -= 1; |
| 469 | return blk_0: { | 824 | return blk_0: { |
| 470 | const pos_0 = p.i; | 825 | const pos_0 = p.i; |
| 471 | if (try p.parseBlockExpr()) break :blk_0 true; | 826 | if (try p.parseBlockExpr()) break :blk_0 true; |
| ... | @@ -481,6 +836,10 @@ const Parser = struct { | ... | @@ -481,6 +836,10 @@ const Parser = struct { |
| 481 | }; | 836 | }; |
| 482 | } | 837 | } |
| 483 | pub fn parseBlockExprPrefix(p: *Parser) Error!bool { | 838 | pub fn parseBlockExprPrefix(p: *Parser) Error!bool { |
| | 839 | const def_index = @intFromEnum(Def.defBlockExprPrefix); |
| | 840 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 841 | p.depths[def_index] += 1; |
| | 842 | defer p.depths[def_index] -= 1; |
| 484 | return blk_0: { | 843 | return blk_0: { |
| 485 | const pos_0 = p.i; | 844 | const pos_0 = p.i; |
| 486 | if ((try p.parseBlockLabel() or true) and try p.parseLBRACE()) break :blk_0 true; | 845 | if ((try p.parseBlockLabel() or true) and try p.parseLBRACE()) break :blk_0 true; |
| ... | @@ -489,6 +848,10 @@ const Parser = struct { | ... | @@ -489,6 +848,10 @@ const Parser = struct { |
| 489 | }; | 848 | }; |
| 490 | } | 849 | } |
| 491 | pub fn parseBlockExpr(p: *Parser) Error!bool { | 850 | pub fn parseBlockExpr(p: *Parser) Error!bool { |
| | 851 | const def_index = @intFromEnum(Def.defBlockExpr); |
| | 852 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 853 | p.depths[def_index] += 1; |
| | 854 | defer p.depths[def_index] -= 1; |
| 492 | return blk_0: { | 855 | return blk_0: { |
| 493 | const pos_0 = p.i; | 856 | const pos_0 = p.i; |
| 494 | if ((try p.parseBlockLabel() or true) and try p.parseBlock()) break :blk_0 true; | 857 | if ((try p.parseBlockLabel() or true) and try p.parseBlock()) break :blk_0 true; |
| ... | @@ -497,6 +860,10 @@ const Parser = struct { | ... | @@ -497,6 +860,10 @@ const Parser = struct { |
| 497 | }; | 860 | }; |
| 498 | } | 861 | } |
| 499 | pub fn parseVarAssignStatement(p: *Parser) Error!bool { | 862 | pub fn parseVarAssignStatement(p: *Parser) Error!bool { |
| | 863 | const def_index = @intFromEnum(Def.defVarAssignStatement); |
| | 864 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 865 | p.depths[def_index] += 1; |
| | 866 | defer p.depths[def_index] -= 1; |
| 500 | return blk_0: { | 867 | return blk_0: { |
| 501 | const pos_0 = p.i; | 868 | const pos_0 = p.i; |
| 502 | if (blk_2: { | 869 | if (blk_2: { |
| ... | @@ -531,6 +898,10 @@ const Parser = struct { | ... | @@ -531,6 +898,10 @@ const Parser = struct { |
| 531 | }; | 898 | }; |
| 532 | } | 899 | } |
| 533 | pub fn parseAssignExpr(p: *Parser) Error!bool { | 900 | pub fn parseAssignExpr(p: *Parser) Error!bool { |
| | 901 | const def_index = @intFromEnum(Def.defAssignExpr); |
| | 902 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 903 | p.depths[def_index] += 1; |
| | 904 | defer p.depths[def_index] -= 1; |
| 534 | return blk_0: { | 905 | return blk_0: { |
| 535 | const pos_0 = p.i; | 906 | const pos_0 = p.i; |
| 536 | if (try p.parseExpr() and blk_2: { | 907 | if (try p.parseExpr() and blk_2: { |
| ... | @@ -572,6 +943,10 @@ const Parser = struct { | ... | @@ -572,6 +943,10 @@ const Parser = struct { |
| 572 | }; | 943 | }; |
| 573 | } | 944 | } |
| 574 | pub fn parseSingleAssignExpr(p: *Parser) Error!bool { | 945 | pub fn parseSingleAssignExpr(p: *Parser) Error!bool { |
| | 946 | const def_index = @intFromEnum(Def.defSingleAssignExpr); |
| | 947 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 948 | p.depths[def_index] += 1; |
| | 949 | defer p.depths[def_index] -= 1; |
| 575 | return blk_0: { | 950 | return blk_0: { |
| 576 | const pos_0 = p.i; | 951 | const pos_0 = p.i; |
| 577 | if (try p.parseExpr() and blk_2: { | 952 | if (try p.parseExpr() and blk_2: { |
| ... | @@ -592,9 +967,10 @@ const Parser = struct { | ... | @@ -592,9 +967,10 @@ const Parser = struct { |
| 592 | }; | 967 | }; |
| 593 | } | 968 | } |
| 594 | pub fn parseExpr(p: *Parser) Error!bool { | 969 | pub fn parseExpr(p: *Parser) Error!bool { |
| 595 | if (p.expr_depth >= max_depth) return error.MaxDepth; | 970 | const def_index = @intFromEnum(Def.defExpr); |
| 596 | p.expr_depth += 1; | 971 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| 597 | defer p.expr_depth -= 1; | 972 | p.depths[def_index] += 1; |
| | 973 | defer p.depths[def_index] -= 1; |
| 598 | return blk_0: { | 974 | return blk_0: { |
| 599 | const pos_0 = p.i; | 975 | const pos_0 = p.i; |
| 600 | if (try p.parseBoolOrExpr()) break :blk_0 true; | 976 | if (try p.parseBoolOrExpr()) break :blk_0 true; |
| ... | @@ -603,6 +979,10 @@ const Parser = struct { | ... | @@ -603,6 +979,10 @@ const Parser = struct { |
| 603 | }; | 979 | }; |
| 604 | } | 980 | } |
| 605 | pub fn parseBoolOrExpr(p: *Parser) Error!bool { | 981 | pub fn parseBoolOrExpr(p: *Parser) Error!bool { |
| | 982 | const def_index = @intFromEnum(Def.defBoolOrExpr); |
| | 983 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 984 | p.depths[def_index] += 1; |
| | 985 | defer p.depths[def_index] -= 1; |
| 606 | return blk_0: { | 986 | return blk_0: { |
| 607 | const pos_0 = p.i; | 987 | const pos_0 = p.i; |
| 608 | if (try p.parseBoolAndExpr() and blk_1: { | 988 | if (try p.parseBoolAndExpr() and blk_1: { |
| ... | @@ -628,6 +1008,10 @@ const Parser = struct { | ... | @@ -628,6 +1008,10 @@ const Parser = struct { |
| 628 | }; | 1008 | }; |
| 629 | } | 1009 | } |
| 630 | pub fn parseBoolAndExpr(p: *Parser) Error!bool { | 1010 | pub fn parseBoolAndExpr(p: *Parser) Error!bool { |
| | 1011 | const def_index = @intFromEnum(Def.defBoolAndExpr); |
| | 1012 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 1013 | p.depths[def_index] += 1; |
| | 1014 | defer p.depths[def_index] -= 1; |
| 631 | return blk_0: { | 1015 | return blk_0: { |
| 632 | const pos_0 = p.i; | 1016 | const pos_0 = p.i; |
| 633 | if (try p.parseCompareExpr() and blk_1: { | 1017 | if (try p.parseCompareExpr() and blk_1: { |
| ... | @@ -653,6 +1037,10 @@ const Parser = struct { | ... | @@ -653,6 +1037,10 @@ const Parser = struct { |
| 653 | }; | 1037 | }; |
| 654 | } | 1038 | } |
| 655 | pub fn parseCompareExpr(p: *Parser) Error!bool { | 1039 | pub fn parseCompareExpr(p: *Parser) Error!bool { |
| | 1040 | const def_index = @intFromEnum(Def.defCompareExpr); |
| | 1041 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 1042 | p.depths[def_index] += 1; |
| | 1043 | defer p.depths[def_index] -= 1; |
| 656 | return blk_0: { | 1044 | return blk_0: { |
| 657 | const pos_0 = p.i; | 1045 | const pos_0 = p.i; |
| 658 | if (try p.parseBitwiseExpr() and (blk_3: { | 1046 | if (try p.parseBitwiseExpr() and (blk_3: { |
| ... | @@ -671,6 +1059,10 @@ const Parser = struct { | ... | @@ -671,6 +1059,10 @@ const Parser = struct { |
| 671 | }; | 1059 | }; |
| 672 | } | 1060 | } |
| 673 | pub fn parseBitwiseExpr(p: *Parser) Error!bool { | 1061 | pub fn parseBitwiseExpr(p: *Parser) Error!bool { |
| | 1062 | const def_index = @intFromEnum(Def.defBitwiseExpr); |
| | 1063 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 1064 | p.depths[def_index] += 1; |
| | 1065 | defer p.depths[def_index] -= 1; |
| 674 | return blk_0: { | 1066 | return blk_0: { |
| 675 | const pos_0 = p.i; | 1067 | const pos_0 = p.i; |
| 676 | if (try p.parseBitShiftExpr() and blk_1: { | 1068 | if (try p.parseBitShiftExpr() and blk_1: { |
| ... | @@ -696,6 +1088,10 @@ const Parser = struct { | ... | @@ -696,6 +1088,10 @@ const Parser = struct { |
| 696 | }; | 1088 | }; |
| 697 | } | 1089 | } |
| 698 | pub fn parseBitShiftExpr(p: *Parser) Error!bool { | 1090 | pub fn parseBitShiftExpr(p: *Parser) Error!bool { |
| | 1091 | const def_index = @intFromEnum(Def.defBitShiftExpr); |
| | 1092 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 1093 | p.depths[def_index] += 1; |
| | 1094 | defer p.depths[def_index] -= 1; |
| 699 | return blk_0: { | 1095 | return blk_0: { |
| 700 | const pos_0 = p.i; | 1096 | const pos_0 = p.i; |
| 701 | if (try p.parseAdditionExpr() and blk_1: { | 1097 | if (try p.parseAdditionExpr() and blk_1: { |
| ... | @@ -721,6 +1117,10 @@ const Parser = struct { | ... | @@ -721,6 +1117,10 @@ const Parser = struct { |
| 721 | }; | 1117 | }; |
| 722 | } | 1118 | } |
| 723 | pub fn parseAdditionExpr(p: *Parser) Error!bool { | 1119 | pub fn parseAdditionExpr(p: *Parser) Error!bool { |
| | 1120 | const def_index = @intFromEnum(Def.defAdditionExpr); |
| | 1121 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 1122 | p.depths[def_index] += 1; |
| | 1123 | defer p.depths[def_index] -= 1; |
| 724 | return blk_0: { | 1124 | return blk_0: { |
| 725 | const pos_0 = p.i; | 1125 | const pos_0 = p.i; |
| 726 | if (try p.parseMultiplyExpr() and blk_1: { | 1126 | if (try p.parseMultiplyExpr() and blk_1: { |
| ... | @@ -746,6 +1146,10 @@ const Parser = struct { | ... | @@ -746,6 +1146,10 @@ const Parser = struct { |
| 746 | }; | 1146 | }; |
| 747 | } | 1147 | } |
| 748 | pub fn parseMultiplyExpr(p: *Parser) Error!bool { | 1148 | pub fn parseMultiplyExpr(p: *Parser) Error!bool { |
| | 1149 | const def_index = @intFromEnum(Def.defMultiplyExpr); |
| | 1150 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 1151 | p.depths[def_index] += 1; |
| | 1152 | defer p.depths[def_index] -= 1; |
| 749 | return blk_0: { | 1153 | return blk_0: { |
| 750 | const pos_0 = p.i; | 1154 | const pos_0 = p.i; |
| 751 | if (try p.parsePrefixExpr() and blk_1: { | 1155 | if (try p.parsePrefixExpr() and blk_1: { |
| ... | @@ -771,6 +1175,10 @@ const Parser = struct { | ... | @@ -771,6 +1175,10 @@ const Parser = struct { |
| 771 | }; | 1175 | }; |
| 772 | } | 1176 | } |
| 773 | pub fn parsePrefixExpr(p: *Parser) Error!bool { | 1177 | pub fn parsePrefixExpr(p: *Parser) Error!bool { |
| | 1178 | const def_index = @intFromEnum(Def.defPrefixExpr); |
| | 1179 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 1180 | p.depths[def_index] += 1; |
| | 1181 | defer p.depths[def_index] -= 1; |
| 774 | return blk_0: { | 1182 | return blk_0: { |
| 775 | const pos_0 = p.i; | 1183 | const pos_0 = p.i; |
| 776 | if (blk_1: { | 1184 | if (blk_1: { |
| ... | @@ -791,6 +1199,10 @@ const Parser = struct { | ... | @@ -791,6 +1199,10 @@ const Parser = struct { |
| 791 | }; | 1199 | }; |
| 792 | } | 1200 | } |
| 793 | pub fn parsePrimaryExpr(p: *Parser) Error!bool { | 1201 | pub fn parsePrimaryExpr(p: *Parser) Error!bool { |
| | 1202 | const def_index = @intFromEnum(Def.defPrimaryExpr); |
| | 1203 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 1204 | p.depths[def_index] += 1; |
| | 1205 | defer p.depths[def_index] -= 1; |
| 794 | return blk_0: { | 1206 | return blk_0: { |
| 795 | const pos_0 = p.i; | 1207 | const pos_0 = p.i; |
| 796 | if (try p.parseAsmExpr()) break :blk_0 true; | 1208 | if (try p.parseAsmExpr()) break :blk_0 true; |
| ... | @@ -855,6 +1267,10 @@ const Parser = struct { | ... | @@ -855,6 +1267,10 @@ const Parser = struct { |
| 855 | }; | 1267 | }; |
| 856 | } | 1268 | } |
| 857 | pub fn parseIfExpr(p: *Parser) Error!bool { | 1269 | pub fn parseIfExpr(p: *Parser) Error!bool { |
| | 1270 | const def_index = @intFromEnum(Def.defIfExpr); |
| | 1271 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 1272 | p.depths[def_index] += 1; |
| | 1273 | defer p.depths[def_index] -= 1; |
| 858 | return blk_0: { | 1274 | return blk_0: { |
| 859 | const pos_0 = p.i; | 1275 | const pos_0 = p.i; |
| 860 | if (try p.parseIfPrefix() and try p.parseExpr() and blk_2: { | 1276 | if (try p.parseIfPrefix() and try p.parseExpr() and blk_2: { |
| ... | @@ -875,9 +1291,10 @@ const Parser = struct { | ... | @@ -875,9 +1291,10 @@ const Parser = struct { |
| 875 | }; | 1291 | }; |
| 876 | } | 1292 | } |
| 877 | pub fn parseBlock(p: *Parser) Error!bool { | 1293 | pub fn parseBlock(p: *Parser) Error!bool { |
| 878 | if (p.block_depth >= max_depth) return error.MaxDepth; | 1294 | const def_index = @intFromEnum(Def.defBlock); |
| 879 | p.block_depth += 1; | 1295 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| 880 | defer p.block_depth -= 1; | 1296 | p.depths[def_index] += 1; |
| | 1297 | defer p.depths[def_index] -= 1; |
| 881 | return blk_0: { | 1298 | return blk_0: { |
| 882 | const pos_0 = p.i; | 1299 | const pos_0 = p.i; |
| 883 | if (try p.parseLBRACE() and blk_1: { | 1300 | if (try p.parseLBRACE() and blk_1: { |
| ... | @@ -893,6 +1310,10 @@ const Parser = struct { | ... | @@ -893,6 +1310,10 @@ const Parser = struct { |
| 893 | }; | 1310 | }; |
| 894 | } | 1311 | } |
| 895 | pub fn parseLoopExpr(p: *Parser) Error!bool { | 1312 | pub fn parseLoopExpr(p: *Parser) Error!bool { |
| | 1313 | const def_index = @intFromEnum(Def.defLoopExpr); |
| | 1314 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 1315 | p.depths[def_index] += 1; |
| | 1316 | defer p.depths[def_index] -= 1; |
| 896 | return blk_0: { | 1317 | return blk_0: { |
| 897 | const pos_0 = p.i; | 1318 | const pos_0 = p.i; |
| 898 | if ((try p.parseKEYWORD_inline() or true) and blk_2: { | 1319 | if ((try p.parseKEYWORD_inline() or true) and blk_2: { |
| ... | @@ -908,6 +1329,10 @@ const Parser = struct { | ... | @@ -908,6 +1329,10 @@ const Parser = struct { |
| 908 | }; | 1329 | }; |
| 909 | } | 1330 | } |
| 910 | pub fn parseForExpr(p: *Parser) Error!bool { | 1331 | pub fn parseForExpr(p: *Parser) Error!bool { |
| | 1332 | const def_index = @intFromEnum(Def.defForExpr); |
| | 1333 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 1334 | p.depths[def_index] += 1; |
| | 1335 | defer p.depths[def_index] -= 1; |
| 911 | return blk_0: { | 1336 | return blk_0: { |
| 912 | const pos_0 = p.i; | 1337 | const pos_0 = p.i; |
| 913 | if (try p.parseForPrefix() and try p.parseExpr() and blk_2: { | 1338 | if (try p.parseForPrefix() and try p.parseExpr() and blk_2: { |
| ... | @@ -928,6 +1353,10 @@ const Parser = struct { | ... | @@ -928,6 +1353,10 @@ const Parser = struct { |
| 928 | }; | 1353 | }; |
| 929 | } | 1354 | } |
| 930 | pub fn parseWhileExpr(p: *Parser) Error!bool { | 1355 | pub fn parseWhileExpr(p: *Parser) Error!bool { |
| | 1356 | const def_index = @intFromEnum(Def.defWhileExpr); |
| | 1357 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 1358 | p.depths[def_index] += 1; |
| | 1359 | defer p.depths[def_index] -= 1; |
| 931 | return blk_0: { | 1360 | return blk_0: { |
| 932 | const pos_0 = p.i; | 1361 | const pos_0 = p.i; |
| 933 | if (try p.parseWhilePrefix() and try p.parseExpr() and (blk_3: { | 1362 | if (try p.parseWhilePrefix() and try p.parseExpr() and (blk_3: { |
| ... | @@ -941,6 +1370,10 @@ const Parser = struct { | ... | @@ -941,6 +1370,10 @@ const Parser = struct { |
| 941 | }; | 1370 | }; |
| 942 | } | 1371 | } |
| 943 | pub fn parseCurlySuffixExpr(p: *Parser) Error!bool { | 1372 | pub fn parseCurlySuffixExpr(p: *Parser) Error!bool { |
| | 1373 | const def_index = @intFromEnum(Def.defCurlySuffixExpr); |
| | 1374 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 1375 | p.depths[def_index] += 1; |
| | 1376 | defer p.depths[def_index] -= 1; |
| 944 | return blk_0: { | 1377 | return blk_0: { |
| 945 | const pos_0 = p.i; | 1378 | const pos_0 = p.i; |
| 946 | if (try p.parseTypeExpr() and blk_2: { | 1379 | if (try p.parseTypeExpr() and blk_2: { |
| ... | @@ -961,6 +1394,10 @@ const Parser = struct { | ... | @@ -961,6 +1394,10 @@ const Parser = struct { |
| 961 | }; | 1394 | }; |
| 962 | } | 1395 | } |
| 963 | pub fn parseInitList(p: *Parser) Error!bool { | 1396 | pub fn parseInitList(p: *Parser) Error!bool { |
| | 1397 | const def_index = @intFromEnum(Def.defInitList); |
| | 1398 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 1399 | p.depths[def_index] += 1; |
| | 1400 | defer p.depths[def_index] -= 1; |
| 964 | return blk_0: { | 1401 | return blk_0: { |
| 965 | const pos_0 = p.i; | 1402 | const pos_0 = p.i; |
| 966 | if (try p.parseLBRACE() and try p.parseFieldInit() and blk_1: { | 1403 | if (try p.parseLBRACE() and try p.parseFieldInit() and blk_1: { |
| ... | @@ -997,6 +1434,10 @@ const Parser = struct { | ... | @@ -997,6 +1434,10 @@ const Parser = struct { |
| 997 | }; | 1434 | }; |
| 998 | } | 1435 | } |
| 999 | pub fn parseTypeExpr(p: *Parser) Error!bool { | 1436 | pub fn parseTypeExpr(p: *Parser) Error!bool { |
| | 1437 | const def_index = @intFromEnum(Def.defTypeExpr); |
| | 1438 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 1439 | p.depths[def_index] += 1; |
| | 1440 | defer p.depths[def_index] -= 1; |
| 1000 | return blk_0: { | 1441 | return blk_0: { |
| 1001 | const pos_0 = p.i; | 1442 | const pos_0 = p.i; |
| 1002 | if (blk_1: { | 1443 | if (blk_1: { |
| ... | @@ -1017,6 +1458,10 @@ const Parser = struct { | ... | @@ -1017,6 +1458,10 @@ const Parser = struct { |
| 1017 | }; | 1458 | }; |
| 1018 | } | 1459 | } |
| 1019 | pub fn parseErrorUnionExpr(p: *Parser) Error!bool { | 1460 | pub fn parseErrorUnionExpr(p: *Parser) Error!bool { |
| | 1461 | const def_index = @intFromEnum(Def.defErrorUnionExpr); |
| | 1462 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 1463 | p.depths[def_index] += 1; |
| | 1464 | defer p.depths[def_index] -= 1; |
| 1020 | return blk_0: { | 1465 | return blk_0: { |
| 1021 | const pos_0 = p.i; | 1466 | const pos_0 = p.i; |
| 1022 | if (try p.parseSuffixExpr() and blk_2: { | 1467 | if (try p.parseSuffixExpr() and blk_2: { |
| ... | @@ -1037,6 +1482,10 @@ const Parser = struct { | ... | @@ -1037,6 +1482,10 @@ const Parser = struct { |
| 1037 | }; | 1482 | }; |
| 1038 | } | 1483 | } |
| 1039 | pub fn parseSuffixExpr(p: *Parser) Error!bool { | 1484 | pub fn parseSuffixExpr(p: *Parser) Error!bool { |
| | 1485 | const def_index = @intFromEnum(Def.defSuffixExpr); |
| | 1486 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 1487 | p.depths[def_index] += 1; |
| | 1488 | defer p.depths[def_index] -= 1; |
| 1040 | return blk_0: { | 1489 | return blk_0: { |
| 1041 | const pos_0 = p.i; | 1490 | const pos_0 = p.i; |
| 1042 | if (try p.parsePrimaryTypeExpr() and blk_1: { | 1491 | if (try p.parsePrimaryTypeExpr() and blk_1: { |
| ... | @@ -1057,6 +1506,10 @@ const Parser = struct { | ... | @@ -1057,6 +1506,10 @@ const Parser = struct { |
| 1057 | }; | 1506 | }; |
| 1058 | } | 1507 | } |
| 1059 | pub fn parsePrimaryTypeExpr(p: *Parser) Error!bool { | 1508 | pub fn parsePrimaryTypeExpr(p: *Parser) Error!bool { |
| | 1509 | const def_index = @intFromEnum(Def.defPrimaryTypeExpr); |
| | 1510 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 1511 | p.depths[def_index] += 1; |
| | 1512 | defer p.depths[def_index] -= 1; |
| 1060 | return blk_0: { | 1513 | return blk_0: { |
| 1061 | const pos_0 = p.i; | 1514 | const pos_0 = p.i; |
| 1062 | if (try p.parseBUILTINIDENTIFIER() and try p.parseFnCallArguments()) break :blk_0 true; | 1515 | if (try p.parseBUILTINIDENTIFIER() and try p.parseFnCallArguments()) break :blk_0 true; |
| ... | @@ -1097,6 +1550,10 @@ const Parser = struct { | ... | @@ -1097,6 +1550,10 @@ const Parser = struct { |
| 1097 | }; | 1550 | }; |
| 1098 | } | 1551 | } |
| 1099 | pub fn parseContainerType(p: *Parser) Error!bool { | 1552 | pub fn parseContainerType(p: *Parser) Error!bool { |
| | 1553 | const def_index = @intFromEnum(Def.defContainerType); |
| | 1554 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 1555 | p.depths[def_index] += 1; |
| | 1556 | defer p.depths[def_index] -= 1; |
| 1100 | return blk_0: { | 1557 | return blk_0: { |
| 1101 | const pos_0 = p.i; | 1558 | const pos_0 = p.i; |
| 1102 | if ((blk_3: { | 1559 | if ((blk_3: { |
| ... | @@ -1112,6 +1569,10 @@ const Parser = struct { | ... | @@ -1112,6 +1569,10 @@ const Parser = struct { |
| 1112 | }; | 1569 | }; |
| 1113 | } | 1570 | } |
| 1114 | pub fn parseErrorSetDecl(p: *Parser) Error!bool { | 1571 | pub fn parseErrorSetDecl(p: *Parser) Error!bool { |
| | 1572 | const def_index = @intFromEnum(Def.defErrorSetDecl); |
| | 1573 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 1574 | p.depths[def_index] += 1; |
| | 1575 | defer p.depths[def_index] -= 1; |
| 1115 | return blk_0: { | 1576 | return blk_0: { |
| 1116 | const pos_0 = p.i; | 1577 | const pos_0 = p.i; |
| 1117 | if (try p.parseKEYWORD_error() and try p.parseLBRACE() and try p.parseIdentifierList() and try p.parseRBRACE()) break :blk_0 true; | 1578 | if (try p.parseKEYWORD_error() and try p.parseLBRACE() and try p.parseIdentifierList() and try p.parseRBRACE()) break :blk_0 true; |
| ... | @@ -1120,6 +1581,10 @@ const Parser = struct { | ... | @@ -1120,6 +1581,10 @@ const Parser = struct { |
| 1120 | }; | 1581 | }; |
| 1121 | } | 1582 | } |
| 1122 | pub fn parseGroupedExpr(p: *Parser) Error!bool { | 1583 | pub fn parseGroupedExpr(p: *Parser) Error!bool { |
| | 1584 | const def_index = @intFromEnum(Def.defGroupedExpr); |
| | 1585 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 1586 | p.depths[def_index] += 1; |
| | 1587 | defer p.depths[def_index] -= 1; |
| 1123 | return blk_0: { | 1588 | return blk_0: { |
| 1124 | const pos_0 = p.i; | 1589 | const pos_0 = p.i; |
| 1125 | if (try p.parseLPAREN() and try p.parseExpr() and try p.parseRPAREN()) break :blk_0 true; | 1590 | if (try p.parseLPAREN() and try p.parseExpr() and try p.parseRPAREN()) break :blk_0 true; |
| ... | @@ -1128,6 +1593,10 @@ const Parser = struct { | ... | @@ -1128,6 +1593,10 @@ const Parser = struct { |
| 1128 | }; | 1593 | }; |
| 1129 | } | 1594 | } |
| 1130 | pub fn parseIfTypeExpr(p: *Parser) Error!bool { | 1595 | pub fn parseIfTypeExpr(p: *Parser) Error!bool { |
| | 1596 | const def_index = @intFromEnum(Def.defIfTypeExpr); |
| | 1597 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 1598 | p.depths[def_index] += 1; |
| | 1599 | defer p.depths[def_index] -= 1; |
| 1131 | return blk_0: { | 1600 | return blk_0: { |
| 1132 | const pos_0 = p.i; | 1601 | const pos_0 = p.i; |
| 1133 | if (try p.parseIfPrefix() and try p.parseTypeExpr() and blk_2: { | 1602 | if (try p.parseIfPrefix() and try p.parseTypeExpr() and blk_2: { |
| ... | @@ -1148,6 +1617,10 @@ const Parser = struct { | ... | @@ -1148,6 +1617,10 @@ const Parser = struct { |
| 1148 | }; | 1617 | }; |
| 1149 | } | 1618 | } |
| 1150 | pub fn parseLabeledTypeExpr(p: *Parser) Error!bool { | 1619 | pub fn parseLabeledTypeExpr(p: *Parser) Error!bool { |
| | 1620 | const def_index = @intFromEnum(Def.defLabeledTypeExpr); |
| | 1621 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 1622 | p.depths[def_index] += 1; |
| | 1623 | defer p.depths[def_index] -= 1; |
| 1151 | return blk_0: { | 1624 | return blk_0: { |
| 1152 | const pos_0 = p.i; | 1625 | const pos_0 = p.i; |
| 1153 | if (try p.parseBlockLabel() and try p.parseBlock()) break :blk_0 true; | 1626 | if (try p.parseBlockLabel() and try p.parseBlock()) break :blk_0 true; |
| ... | @@ -1160,6 +1633,10 @@ const Parser = struct { | ... | @@ -1160,6 +1633,10 @@ const Parser = struct { |
| 1160 | }; | 1633 | }; |
| 1161 | } | 1634 | } |
| 1162 | pub fn parseLoopTypeExpr(p: *Parser) Error!bool { | 1635 | pub fn parseLoopTypeExpr(p: *Parser) Error!bool { |
| | 1636 | const def_index = @intFromEnum(Def.defLoopTypeExpr); |
| | 1637 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 1638 | p.depths[def_index] += 1; |
| | 1639 | defer p.depths[def_index] -= 1; |
| 1163 | return blk_0: { | 1640 | return blk_0: { |
| 1164 | const pos_0 = p.i; | 1641 | const pos_0 = p.i; |
| 1165 | if ((try p.parseKEYWORD_inline() or true) and blk_2: { | 1642 | if ((try p.parseKEYWORD_inline() or true) and blk_2: { |
| ... | @@ -1175,6 +1652,10 @@ const Parser = struct { | ... | @@ -1175,6 +1652,10 @@ const Parser = struct { |
| 1175 | }; | 1652 | }; |
| 1176 | } | 1653 | } |
| 1177 | pub fn parseForTypeExpr(p: *Parser) Error!bool { | 1654 | pub fn parseForTypeExpr(p: *Parser) Error!bool { |
| | 1655 | const def_index = @intFromEnum(Def.defForTypeExpr); |
| | 1656 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 1657 | p.depths[def_index] += 1; |
| | 1658 | defer p.depths[def_index] -= 1; |
| 1178 | return blk_0: { | 1659 | return blk_0: { |
| 1179 | const pos_0 = p.i; | 1660 | const pos_0 = p.i; |
| 1180 | if (try p.parseForPrefix() and try p.parseTypeExpr() and blk_2: { | 1661 | if (try p.parseForPrefix() and try p.parseTypeExpr() and blk_2: { |
| ... | @@ -1195,6 +1676,10 @@ const Parser = struct { | ... | @@ -1195,6 +1676,10 @@ const Parser = struct { |
| 1195 | }; | 1676 | }; |
| 1196 | } | 1677 | } |
| 1197 | pub fn parseWhileTypeExpr(p: *Parser) Error!bool { | 1678 | pub fn parseWhileTypeExpr(p: *Parser) Error!bool { |
| | 1679 | const def_index = @intFromEnum(Def.defWhileTypeExpr); |
| | 1680 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 1681 | p.depths[def_index] += 1; |
| | 1682 | defer p.depths[def_index] -= 1; |
| 1198 | return blk_0: { | 1683 | return blk_0: { |
| 1199 | const pos_0 = p.i; | 1684 | const pos_0 = p.i; |
| 1200 | if (try p.parseWhilePrefix() and try p.parseTypeExpr() and blk_2: { | 1685 | if (try p.parseWhilePrefix() and try p.parseTypeExpr() and blk_2: { |
| ... | @@ -1215,6 +1700,10 @@ const Parser = struct { | ... | @@ -1215,6 +1700,10 @@ const Parser = struct { |
| 1215 | }; | 1700 | }; |
| 1216 | } | 1701 | } |
| 1217 | pub fn parseSwitchExpr(p: *Parser) Error!bool { | 1702 | pub fn parseSwitchExpr(p: *Parser) Error!bool { |
| | 1703 | const def_index = @intFromEnum(Def.defSwitchExpr); |
| | 1704 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 1705 | p.depths[def_index] += 1; |
| | 1706 | defer p.depths[def_index] -= 1; |
| 1218 | return blk_0: { | 1707 | return blk_0: { |
| 1219 | const pos_0 = p.i; | 1708 | const pos_0 = p.i; |
| 1220 | if (try p.parseKEYWORD_switch() and try p.parseLPAREN() and try p.parseExpr() and try p.parseRPAREN() and try p.parseLBRACE() and try p.parseSwitchProngList() and try p.parseRBRACE()) break :blk_0 true; | 1709 | if (try p.parseKEYWORD_switch() and try p.parseLPAREN() and try p.parseExpr() and try p.parseRPAREN() and try p.parseLBRACE() and try p.parseSwitchProngList() and try p.parseRBRACE()) break :blk_0 true; |
| ... | @@ -1223,6 +1712,10 @@ const Parser = struct { | ... | @@ -1223,6 +1712,10 @@ const Parser = struct { |
| 1223 | }; | 1712 | }; |
| 1224 | } | 1713 | } |
| 1225 | pub fn parseAsmExpr(p: *Parser) Error!bool { | 1714 | pub fn parseAsmExpr(p: *Parser) Error!bool { |
| | 1715 | const def_index = @intFromEnum(Def.defAsmExpr); |
| | 1716 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 1717 | p.depths[def_index] += 1; |
| | 1718 | defer p.depths[def_index] -= 1; |
| 1226 | return blk_0: { | 1719 | return blk_0: { |
| 1227 | const pos_0 = p.i; | 1720 | const pos_0 = p.i; |
| 1228 | if (try p.parseKEYWORD_asm() and (try p.parseKEYWORD_volatile() or true) and try p.parseLPAREN() and try p.parseExpr() and (try p.parseAsmOutput() or true) and try p.parseRPAREN()) break :blk_0 true; | 1721 | if (try p.parseKEYWORD_asm() and (try p.parseKEYWORD_volatile() or true) and try p.parseLPAREN() and try p.parseExpr() and (try p.parseAsmOutput() or true) and try p.parseRPAREN()) break :blk_0 true; |
| ... | @@ -1231,6 +1724,10 @@ const Parser = struct { | ... | @@ -1231,6 +1724,10 @@ const Parser = struct { |
| 1231 | }; | 1724 | }; |
| 1232 | } | 1725 | } |
| 1233 | pub fn parseAsmOutput(p: *Parser) Error!bool { | 1726 | pub fn parseAsmOutput(p: *Parser) Error!bool { |
| | 1727 | const def_index = @intFromEnum(Def.defAsmOutput); |
| | 1728 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 1729 | p.depths[def_index] += 1; |
| | 1730 | defer p.depths[def_index] -= 1; |
| 1234 | return blk_0: { | 1731 | return blk_0: { |
| 1235 | const pos_0 = p.i; | 1732 | const pos_0 = p.i; |
| 1236 | if (try p.parseCOLON() and try p.parseAsmOutputList() and (try p.parseAsmInput() or true)) break :blk_0 true; | 1733 | if (try p.parseCOLON() and try p.parseAsmOutputList() and (try p.parseAsmInput() or true)) break :blk_0 true; |
| ... | @@ -1239,6 +1736,10 @@ const Parser = struct { | ... | @@ -1239,6 +1736,10 @@ const Parser = struct { |
| 1239 | }; | 1736 | }; |
| 1240 | } | 1737 | } |
| 1241 | pub fn parseAsmOutputItem(p: *Parser) Error!bool { | 1738 | pub fn parseAsmOutputItem(p: *Parser) Error!bool { |
| | 1739 | const def_index = @intFromEnum(Def.defAsmOutputItem); |
| | 1740 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 1741 | p.depths[def_index] += 1; |
| | 1742 | defer p.depths[def_index] -= 1; |
| 1242 | return blk_0: { | 1743 | return blk_0: { |
| 1243 | const pos_0 = p.i; | 1744 | const pos_0 = p.i; |
| 1244 | if (try p.parseLBRACKET() and try p.parseIDENTIFIER() and try p.parseRBRACKET() and try p.parseSTRINGLITERALSINGLE() and try p.parseLPAREN() and blk_2: { | 1745 | if (try p.parseLBRACKET() and try p.parseIDENTIFIER() and try p.parseRBRACKET() and try p.parseSTRINGLITERALSINGLE() and try p.parseLPAREN() and blk_2: { |
| ... | @@ -1254,6 +1755,10 @@ const Parser = struct { | ... | @@ -1254,6 +1755,10 @@ const Parser = struct { |
| 1254 | }; | 1755 | }; |
| 1255 | } | 1756 | } |
| 1256 | pub fn parseAsmInput(p: *Parser) Error!bool { | 1757 | pub fn parseAsmInput(p: *Parser) Error!bool { |
| | 1758 | const def_index = @intFromEnum(Def.defAsmInput); |
| | 1759 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 1760 | p.depths[def_index] += 1; |
| | 1761 | defer p.depths[def_index] -= 1; |
| 1257 | return blk_0: { | 1762 | return blk_0: { |
| 1258 | const pos_0 = p.i; | 1763 | const pos_0 = p.i; |
| 1259 | if (try p.parseCOLON() and try p.parseAsmInputList() and (try p.parseAsmClobbers() or true)) break :blk_0 true; | 1764 | if (try p.parseCOLON() and try p.parseAsmInputList() and (try p.parseAsmClobbers() or true)) break :blk_0 true; |
| ... | @@ -1262,6 +1767,10 @@ const Parser = struct { | ... | @@ -1262,6 +1767,10 @@ const Parser = struct { |
| 1262 | }; | 1767 | }; |
| 1263 | } | 1768 | } |
| 1264 | pub fn parseAsmInputItem(p: *Parser) Error!bool { | 1769 | pub fn parseAsmInputItem(p: *Parser) Error!bool { |
| | 1770 | const def_index = @intFromEnum(Def.defAsmInputItem); |
| | 1771 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 1772 | p.depths[def_index] += 1; |
| | 1773 | defer p.depths[def_index] -= 1; |
| 1265 | return blk_0: { | 1774 | return blk_0: { |
| 1266 | const pos_0 = p.i; | 1775 | const pos_0 = p.i; |
| 1267 | if (try p.parseLBRACKET() and try p.parseIDENTIFIER() and try p.parseRBRACKET() and try p.parseSTRINGLITERALSINGLE() and try p.parseLPAREN() and try p.parseExpr() and try p.parseRPAREN()) break :blk_0 true; | 1776 | if (try p.parseLBRACKET() and try p.parseIDENTIFIER() and try p.parseRBRACKET() and try p.parseSTRINGLITERALSINGLE() and try p.parseLPAREN() and try p.parseExpr() and try p.parseRPAREN()) break :blk_0 true; |
| ... | @@ -1270,6 +1779,10 @@ const Parser = struct { | ... | @@ -1270,6 +1779,10 @@ const Parser = struct { |
| 1270 | }; | 1779 | }; |
| 1271 | } | 1780 | } |
| 1272 | pub fn parseAsmClobbers(p: *Parser) Error!bool { | 1781 | pub fn parseAsmClobbers(p: *Parser) Error!bool { |
| | 1782 | const def_index = @intFromEnum(Def.defAsmClobbers); |
| | 1783 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 1784 | p.depths[def_index] += 1; |
| | 1785 | defer p.depths[def_index] -= 1; |
| 1273 | return blk_0: { | 1786 | return blk_0: { |
| 1274 | const pos_0 = p.i; | 1787 | const pos_0 = p.i; |
| 1275 | if (try p.parseCOLON() and try p.parseExpr()) break :blk_0 true; | 1788 | if (try p.parseCOLON() and try p.parseExpr()) break :blk_0 true; |
| ... | @@ -1278,6 +1791,10 @@ const Parser = struct { | ... | @@ -1278,6 +1791,10 @@ const Parser = struct { |
| 1278 | }; | 1791 | }; |
| 1279 | } | 1792 | } |
| 1280 | pub fn parseBreakLabel(p: *Parser) Error!bool { | 1793 | pub fn parseBreakLabel(p: *Parser) Error!bool { |
| | 1794 | const def_index = @intFromEnum(Def.defBreakLabel); |
| | 1795 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 1796 | p.depths[def_index] += 1; |
| | 1797 | defer p.depths[def_index] -= 1; |
| 1281 | return blk_0: { | 1798 | return blk_0: { |
| 1282 | const pos_0 = p.i; | 1799 | const pos_0 = p.i; |
| 1283 | if (try p.parseCOLON() and try p.parseIDENTIFIER()) break :blk_0 true; | 1800 | if (try p.parseCOLON() and try p.parseIDENTIFIER()) break :blk_0 true; |
| ... | @@ -1286,6 +1803,10 @@ const Parser = struct { | ... | @@ -1286,6 +1803,10 @@ const Parser = struct { |
| 1286 | }; | 1803 | }; |
| 1287 | } | 1804 | } |
| 1288 | pub fn parseBlockLabel(p: *Parser) Error!bool { | 1805 | pub fn parseBlockLabel(p: *Parser) Error!bool { |
| | 1806 | const def_index = @intFromEnum(Def.defBlockLabel); |
| | 1807 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 1808 | p.depths[def_index] += 1; |
| | 1809 | defer p.depths[def_index] -= 1; |
| 1289 | return blk_0: { | 1810 | return blk_0: { |
| 1290 | const pos_0 = p.i; | 1811 | const pos_0 = p.i; |
| 1291 | if (try p.parseIDENTIFIER() and try p.parseCOLON()) break :blk_0 true; | 1812 | if (try p.parseIDENTIFIER() and try p.parseCOLON()) break :blk_0 true; |
| ... | @@ -1294,6 +1815,10 @@ const Parser = struct { | ... | @@ -1294,6 +1815,10 @@ const Parser = struct { |
| 1294 | }; | 1815 | }; |
| 1295 | } | 1816 | } |
| 1296 | pub fn parseFieldInit(p: *Parser) Error!bool { | 1817 | pub fn parseFieldInit(p: *Parser) Error!bool { |
| | 1818 | const def_index = @intFromEnum(Def.defFieldInit); |
| | 1819 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 1820 | p.depths[def_index] += 1; |
| | 1821 | defer p.depths[def_index] -= 1; |
| 1297 | return blk_0: { | 1822 | return blk_0: { |
| 1298 | const pos_0 = p.i; | 1823 | const pos_0 = p.i; |
| 1299 | if (try p.parseDOT() and try p.parseIDENTIFIER() and try p.parseEQUAL() and try p.parseExpr()) break :blk_0 true; | 1824 | if (try p.parseDOT() and try p.parseIDENTIFIER() and try p.parseEQUAL() and try p.parseExpr()) break :blk_0 true; |
| ... | @@ -1302,6 +1827,10 @@ const Parser = struct { | ... | @@ -1302,6 +1827,10 @@ const Parser = struct { |
| 1302 | }; | 1827 | }; |
| 1303 | } | 1828 | } |
| 1304 | pub fn parseWhileContinueExpr(p: *Parser) Error!bool { | 1829 | pub fn parseWhileContinueExpr(p: *Parser) Error!bool { |
| | 1830 | const def_index = @intFromEnum(Def.defWhileContinueExpr); |
| | 1831 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 1832 | p.depths[def_index] += 1; |
| | 1833 | defer p.depths[def_index] -= 1; |
| 1305 | return blk_0: { | 1834 | return blk_0: { |
| 1306 | const pos_0 = p.i; | 1835 | const pos_0 = p.i; |
| 1307 | if (try p.parseCOLON() and try p.parseLPAREN() and try p.parseAssignExpr() and try p.parseRPAREN()) break :blk_0 true; | 1836 | if (try p.parseCOLON() and try p.parseLPAREN() and try p.parseAssignExpr() and try p.parseRPAREN()) break :blk_0 true; |
| ... | @@ -1310,6 +1839,10 @@ const Parser = struct { | ... | @@ -1310,6 +1839,10 @@ const Parser = struct { |
| 1310 | }; | 1839 | }; |
| 1311 | } | 1840 | } |
| 1312 | pub fn parseLinkSection(p: *Parser) Error!bool { | 1841 | pub fn parseLinkSection(p: *Parser) Error!bool { |
| | 1842 | const def_index = @intFromEnum(Def.defLinkSection); |
| | 1843 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 1844 | p.depths[def_index] += 1; |
| | 1845 | defer p.depths[def_index] -= 1; |
| 1313 | return blk_0: { | 1846 | return blk_0: { |
| 1314 | const pos_0 = p.i; | 1847 | const pos_0 = p.i; |
| 1315 | if (try p.parseKEYWORD_linksection() and try p.parseLPAREN() and try p.parseExpr() and try p.parseRPAREN()) break :blk_0 true; | 1848 | if (try p.parseKEYWORD_linksection() and try p.parseLPAREN() and try p.parseExpr() and try p.parseRPAREN()) break :blk_0 true; |
| ... | @@ -1318,6 +1851,10 @@ const Parser = struct { | ... | @@ -1318,6 +1851,10 @@ const Parser = struct { |
| 1318 | }; | 1851 | }; |
| 1319 | } | 1852 | } |
| 1320 | pub fn parseAddrSpace(p: *Parser) Error!bool { | 1853 | pub fn parseAddrSpace(p: *Parser) Error!bool { |
| | 1854 | const def_index = @intFromEnum(Def.defAddrSpace); |
| | 1855 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 1856 | p.depths[def_index] += 1; |
| | 1857 | defer p.depths[def_index] -= 1; |
| 1321 | return blk_0: { | 1858 | return blk_0: { |
| 1322 | const pos_0 = p.i; | 1859 | const pos_0 = p.i; |
| 1323 | if (try p.parseKEYWORD_addrspace() and try p.parseLPAREN() and try p.parseExpr() and try p.parseRPAREN()) break :blk_0 true; | 1860 | if (try p.parseKEYWORD_addrspace() and try p.parseLPAREN() and try p.parseExpr() and try p.parseRPAREN()) break :blk_0 true; |
| ... | @@ -1326,6 +1863,10 @@ const Parser = struct { | ... | @@ -1326,6 +1863,10 @@ const Parser = struct { |
| 1326 | }; | 1863 | }; |
| 1327 | } | 1864 | } |
| 1328 | pub fn parseCallConv(p: *Parser) Error!bool { | 1865 | pub fn parseCallConv(p: *Parser) Error!bool { |
| | 1866 | const def_index = @intFromEnum(Def.defCallConv); |
| | 1867 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 1868 | p.depths[def_index] += 1; |
| | 1869 | defer p.depths[def_index] -= 1; |
| 1329 | return blk_0: { | 1870 | return blk_0: { |
| 1330 | const pos_0 = p.i; | 1871 | const pos_0 = p.i; |
| 1331 | if (try p.parseKEYWORD_callconv() and try p.parseLPAREN() and try p.parseExpr() and try p.parseRPAREN()) break :blk_0 true; | 1872 | if (try p.parseKEYWORD_callconv() and try p.parseLPAREN() and try p.parseExpr() and try p.parseRPAREN()) break :blk_0 true; |
| ... | @@ -1334,6 +1875,10 @@ const Parser = struct { | ... | @@ -1334,6 +1875,10 @@ const Parser = struct { |
| 1334 | }; | 1875 | }; |
| 1335 | } | 1876 | } |
| 1336 | pub fn parseParamDecl(p: *Parser) Error!bool { | 1877 | pub fn parseParamDecl(p: *Parser) Error!bool { |
| | 1878 | const def_index = @intFromEnum(Def.defParamDecl); |
| | 1879 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 1880 | p.depths[def_index] += 1; |
| | 1881 | defer p.depths[def_index] -= 1; |
| 1337 | return blk_0: { | 1882 | return blk_0: { |
| 1338 | const pos_0 = p.i; | 1883 | const pos_0 = p.i; |
| 1339 | if ((try p.parsedoc_comment() or true) and blk_2: { | 1884 | if ((try p.parsedoc_comment() or true) and blk_2: { |
| ... | @@ -1354,6 +1899,10 @@ const Parser = struct { | ... | @@ -1354,6 +1899,10 @@ const Parser = struct { |
| 1354 | }; | 1899 | }; |
| 1355 | } | 1900 | } |
| 1356 | pub fn parseParamType(p: *Parser) Error!bool { | 1901 | pub fn parseParamType(p: *Parser) Error!bool { |
| | 1902 | const def_index = @intFromEnum(Def.defParamType); |
| | 1903 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 1904 | p.depths[def_index] += 1; |
| | 1905 | defer p.depths[def_index] -= 1; |
| 1357 | return blk_0: { | 1906 | return blk_0: { |
| 1358 | const pos_0 = p.i; | 1907 | const pos_0 = p.i; |
| 1359 | if (try p.parseKEYWORD_anytype()) break :blk_0 true; | 1908 | if (try p.parseKEYWORD_anytype()) break :blk_0 true; |
| ... | @@ -1364,6 +1913,10 @@ const Parser = struct { | ... | @@ -1364,6 +1913,10 @@ const Parser = struct { |
| 1364 | }; | 1913 | }; |
| 1365 | } | 1914 | } |
| 1366 | pub fn parseIfPrefix(p: *Parser) Error!bool { | 1915 | pub fn parseIfPrefix(p: *Parser) Error!bool { |
| | 1916 | const def_index = @intFromEnum(Def.defIfPrefix); |
| | 1917 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 1918 | p.depths[def_index] += 1; |
| | 1919 | defer p.depths[def_index] -= 1; |
| 1367 | return blk_0: { | 1920 | return blk_0: { |
| 1368 | const pos_0 = p.i; | 1921 | const pos_0 = p.i; |
| 1369 | if (try p.parseKEYWORD_if() and try p.parseLPAREN() and try p.parseExpr() and try p.parseRPAREN() and (try p.parsePtrPayload() or true)) break :blk_0 true; | 1922 | if (try p.parseKEYWORD_if() and try p.parseLPAREN() and try p.parseExpr() and try p.parseRPAREN() and (try p.parsePtrPayload() or true)) break :blk_0 true; |
| ... | @@ -1372,6 +1925,10 @@ const Parser = struct { | ... | @@ -1372,6 +1925,10 @@ const Parser = struct { |
| 1372 | }; | 1925 | }; |
| 1373 | } | 1926 | } |
| 1374 | pub fn parseWhilePrefix(p: *Parser) Error!bool { | 1927 | pub fn parseWhilePrefix(p: *Parser) Error!bool { |
| | 1928 | const def_index = @intFromEnum(Def.defWhilePrefix); |
| | 1929 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 1930 | p.depths[def_index] += 1; |
| | 1931 | defer p.depths[def_index] -= 1; |
| 1375 | return blk_0: { | 1932 | return blk_0: { |
| 1376 | const pos_0 = p.i; | 1933 | const pos_0 = p.i; |
| 1377 | if (try p.parseKEYWORD_while() and try p.parseLPAREN() and try p.parseExpr() and try p.parseRPAREN() and (try p.parsePtrPayload() or true) and (try p.parseWhileContinueExpr() or true)) break :blk_0 true; | 1934 | if (try p.parseKEYWORD_while() and try p.parseLPAREN() and try p.parseExpr() and try p.parseRPAREN() and (try p.parsePtrPayload() or true) and (try p.parseWhileContinueExpr() or true)) break :blk_0 true; |
| ... | @@ -1380,6 +1937,10 @@ const Parser = struct { | ... | @@ -1380,6 +1937,10 @@ const Parser = struct { |
| 1380 | }; | 1937 | }; |
| 1381 | } | 1938 | } |
| 1382 | pub fn parseForPrefix(p: *Parser) Error!bool { | 1939 | pub fn parseForPrefix(p: *Parser) Error!bool { |
| | 1940 | const def_index = @intFromEnum(Def.defForPrefix); |
| | 1941 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 1942 | p.depths[def_index] += 1; |
| | 1943 | defer p.depths[def_index] -= 1; |
| 1383 | return blk_0: { | 1944 | return blk_0: { |
| 1384 | const pos_0 = p.i; | 1945 | const pos_0 = p.i; |
| 1385 | if (try p.parseKEYWORD_for() and try p.parseLPAREN() and try p.parseForArgumentsList() and try p.parseRPAREN() and try p.parsePtrListPayload()) break :blk_0 true; | 1946 | if (try p.parseKEYWORD_for() and try p.parseLPAREN() and try p.parseForArgumentsList() and try p.parseRPAREN() and try p.parsePtrListPayload()) break :blk_0 true; |
| ... | @@ -1388,6 +1949,10 @@ const Parser = struct { | ... | @@ -1388,6 +1949,10 @@ const Parser = struct { |
| 1388 | }; | 1949 | }; |
| 1389 | } | 1950 | } |
| 1390 | pub fn parsePayload(p: *Parser) Error!bool { | 1951 | pub fn parsePayload(p: *Parser) Error!bool { |
| | 1952 | const def_index = @intFromEnum(Def.defPayload); |
| | 1953 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 1954 | p.depths[def_index] += 1; |
| | 1955 | defer p.depths[def_index] -= 1; |
| 1391 | return blk_0: { | 1956 | return blk_0: { |
| 1392 | const pos_0 = p.i; | 1957 | const pos_0 = p.i; |
| 1393 | if (try p.parsePIPE() and try p.parseIDENTIFIER() and try p.parsePIPE()) break :blk_0 true; | 1958 | if (try p.parsePIPE() and try p.parseIDENTIFIER() and try p.parsePIPE()) break :blk_0 true; |
| ... | @@ -1396,6 +1961,10 @@ const Parser = struct { | ... | @@ -1396,6 +1961,10 @@ const Parser = struct { |
| 1396 | }; | 1961 | }; |
| 1397 | } | 1962 | } |
| 1398 | pub fn parsePtrPayload(p: *Parser) Error!bool { | 1963 | pub fn parsePtrPayload(p: *Parser) Error!bool { |
| | 1964 | const def_index = @intFromEnum(Def.defPtrPayload); |
| | 1965 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 1966 | p.depths[def_index] += 1; |
| | 1967 | defer p.depths[def_index] -= 1; |
| 1399 | return blk_0: { | 1968 | return blk_0: { |
| 1400 | const pos_0 = p.i; | 1969 | const pos_0 = p.i; |
| 1401 | if (try p.parsePIPE() and (try p.parseASTERISK() or true) and try p.parseIDENTIFIER() and try p.parsePIPE()) break :blk_0 true; | 1970 | if (try p.parsePIPE() and (try p.parseASTERISK() or true) and try p.parseIDENTIFIER() and try p.parsePIPE()) break :blk_0 true; |
| ... | @@ -1404,6 +1973,10 @@ const Parser = struct { | ... | @@ -1404,6 +1973,10 @@ const Parser = struct { |
| 1404 | }; | 1973 | }; |
| 1405 | } | 1974 | } |
| 1406 | pub fn parsePtrIndexPayload(p: *Parser) Error!bool { | 1975 | pub fn parsePtrIndexPayload(p: *Parser) Error!bool { |
| | 1976 | const def_index = @intFromEnum(Def.defPtrIndexPayload); |
| | 1977 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 1978 | p.depths[def_index] += 1; |
| | 1979 | defer p.depths[def_index] -= 1; |
| 1407 | return blk_0: { | 1980 | return blk_0: { |
| 1408 | const pos_0 = p.i; | 1981 | const pos_0 = p.i; |
| 1409 | if (try p.parsePIPE() and (try p.parseASTERISK() or true) and try p.parseIDENTIFIER() and (blk_3: { | 1982 | if (try p.parsePIPE() and (try p.parseASTERISK() or true) and try p.parseIDENTIFIER() and (blk_3: { |
| ... | @@ -1417,6 +1990,10 @@ const Parser = struct { | ... | @@ -1417,6 +1990,10 @@ const Parser = struct { |
| 1417 | }; | 1990 | }; |
| 1418 | } | 1991 | } |
| 1419 | pub fn parsePtrListPayload(p: *Parser) Error!bool { | 1992 | pub fn parsePtrListPayload(p: *Parser) Error!bool { |
| | 1993 | const def_index = @intFromEnum(Def.defPtrListPayload); |
| | 1994 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 1995 | p.depths[def_index] += 1; |
| | 1996 | defer p.depths[def_index] -= 1; |
| 1420 | return blk_0: { | 1997 | return blk_0: { |
| 1421 | const pos_0 = p.i; | 1998 | const pos_0 = p.i; |
| 1422 | if (try p.parsePIPE() and (try p.parseASTERISK() or true) and try p.parseIDENTIFIER() and blk_1: { | 1999 | if (try p.parsePIPE() and (try p.parseASTERISK() or true) and try p.parseIDENTIFIER() and blk_1: { |
| ... | @@ -1437,6 +2014,10 @@ const Parser = struct { | ... | @@ -1437,6 +2014,10 @@ const Parser = struct { |
| 1437 | }; | 2014 | }; |
| 1438 | } | 2015 | } |
| 1439 | pub fn parseSwitchProng(p: *Parser) Error!bool { | 2016 | pub fn parseSwitchProng(p: *Parser) Error!bool { |
| | 2017 | const def_index = @intFromEnum(Def.defSwitchProng); |
| | 2018 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 2019 | p.depths[def_index] += 1; |
| | 2020 | defer p.depths[def_index] -= 1; |
| 1440 | return blk_0: { | 2021 | return blk_0: { |
| 1441 | const pos_0 = p.i; | 2022 | const pos_0 = p.i; |
| 1442 | if ((try p.parseKEYWORD_inline() or true) and try p.parseSwitchCase() and try p.parseEQUALRARROW() and (try p.parsePtrIndexPayload() or true) and try p.parseSingleAssignExpr()) break :blk_0 true; | 2023 | if ((try p.parseKEYWORD_inline() or true) and try p.parseSwitchCase() and try p.parseEQUALRARROW() and (try p.parsePtrIndexPayload() or true) and try p.parseSingleAssignExpr()) break :blk_0 true; |
| ... | @@ -1445,6 +2026,10 @@ const Parser = struct { | ... | @@ -1445,6 +2026,10 @@ const Parser = struct { |
| 1445 | }; | 2026 | }; |
| 1446 | } | 2027 | } |
| 1447 | pub fn parseSwitchCase(p: *Parser) Error!bool { | 2028 | pub fn parseSwitchCase(p: *Parser) Error!bool { |
| | 2029 | const def_index = @intFromEnum(Def.defSwitchCase); |
| | 2030 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 2031 | p.depths[def_index] += 1; |
| | 2032 | defer p.depths[def_index] -= 1; |
| 1448 | return blk_0: { | 2033 | return blk_0: { |
| 1449 | const pos_0 = p.i; | 2034 | const pos_0 = p.i; |
| 1450 | if (try p.parseSwitchItem() and blk_1: { | 2035 | if (try p.parseSwitchItem() and blk_1: { |
| ... | @@ -1467,6 +2052,10 @@ const Parser = struct { | ... | @@ -1467,6 +2052,10 @@ const Parser = struct { |
| 1467 | }; | 2052 | }; |
| 1468 | } | 2053 | } |
| 1469 | pub fn parseSwitchItem(p: *Parser) Error!bool { | 2054 | pub fn parseSwitchItem(p: *Parser) Error!bool { |
| | 2055 | const def_index = @intFromEnum(Def.defSwitchItem); |
| | 2056 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 2057 | p.depths[def_index] += 1; |
| | 2058 | defer p.depths[def_index] -= 1; |
| 1470 | return blk_0: { | 2059 | return blk_0: { |
| 1471 | const pos_0 = p.i; | 2060 | const pos_0 = p.i; |
| 1472 | if (try p.parseExpr() and (blk_3: { | 2061 | if (try p.parseExpr() and (blk_3: { |
| ... | @@ -1480,6 +2069,10 @@ const Parser = struct { | ... | @@ -1480,6 +2069,10 @@ const Parser = struct { |
| 1480 | }; | 2069 | }; |
| 1481 | } | 2070 | } |
| 1482 | pub fn parseForArgumentsList(p: *Parser) Error!bool { | 2071 | pub fn parseForArgumentsList(p: *Parser) Error!bool { |
| | 2072 | const def_index = @intFromEnum(Def.defForArgumentsList); |
| | 2073 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 2074 | p.depths[def_index] += 1; |
| | 2075 | defer p.depths[def_index] -= 1; |
| 1483 | return blk_0: { | 2076 | return blk_0: { |
| 1484 | const pos_0 = p.i; | 2077 | const pos_0 = p.i; |
| 1485 | if (try p.parseForItem() and blk_1: { | 2078 | if (try p.parseForItem() and blk_1: { |
| ... | @@ -1500,6 +2093,10 @@ const Parser = struct { | ... | @@ -1500,6 +2093,10 @@ const Parser = struct { |
| 1500 | }; | 2093 | }; |
| 1501 | } | 2094 | } |
| 1502 | pub fn parseForItem(p: *Parser) Error!bool { | 2095 | pub fn parseForItem(p: *Parser) Error!bool { |
| | 2096 | const def_index = @intFromEnum(Def.defForItem); |
| | 2097 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 2098 | p.depths[def_index] += 1; |
| | 2099 | defer p.depths[def_index] -= 1; |
| 1503 | return blk_0: { | 2100 | return blk_0: { |
| 1504 | const pos_0 = p.i; | 2101 | const pos_0 = p.i; |
| 1505 | if (try p.parseExpr() and blk_2: { | 2102 | if (try p.parseExpr() and blk_2: { |
| ... | @@ -1532,6 +2129,10 @@ const Parser = struct { | ... | @@ -1532,6 +2129,10 @@ const Parser = struct { |
| 1532 | }; | 2129 | }; |
| 1533 | } | 2130 | } |
| 1534 | pub fn parseAssignOp(p: *Parser) Error!bool { | 2131 | pub fn parseAssignOp(p: *Parser) Error!bool { |
| | 2132 | const def_index = @intFromEnum(Def.defAssignOp); |
| | 2133 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 2134 | p.depths[def_index] += 1; |
| | 2135 | defer p.depths[def_index] -= 1; |
| 1535 | return blk_0: { | 2136 | return blk_0: { |
| 1536 | const pos_0 = p.i; | 2137 | const pos_0 = p.i; |
| 1537 | if (try p.parseASTERISKEQUAL()) break :blk_0 true; | 2138 | if (try p.parseASTERISKEQUAL()) break :blk_0 true; |
| ... | @@ -1574,6 +2175,10 @@ const Parser = struct { | ... | @@ -1574,6 +2175,10 @@ const Parser = struct { |
| 1574 | }; | 2175 | }; |
| 1575 | } | 2176 | } |
| 1576 | pub fn parseOrOp(p: *Parser) Error!bool { | 2177 | pub fn parseOrOp(p: *Parser) Error!bool { |
| | 2178 | const def_index = @intFromEnum(Def.defOrOp); |
| | 2179 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 2180 | p.depths[def_index] += 1; |
| | 2181 | defer p.depths[def_index] -= 1; |
| 1577 | return blk_0: { | 2182 | return blk_0: { |
| 1578 | const pos_0 = p.i; | 2183 | const pos_0 = p.i; |
| 1579 | if (try p.parsepre_op_white() and try p.parseKEYWORD_or() and try p.parsepost_op_white()) break :blk_0 true; | 2184 | if (try p.parsepre_op_white() and try p.parseKEYWORD_or() and try p.parsepost_op_white()) break :blk_0 true; |
| ... | @@ -1594,6 +2199,10 @@ const Parser = struct { | ... | @@ -1594,6 +2199,10 @@ const Parser = struct { |
| 1594 | }; | 2199 | }; |
| 1595 | } | 2200 | } |
| 1596 | pub fn parseAndOp(p: *Parser) Error!bool { | 2201 | pub fn parseAndOp(p: *Parser) Error!bool { |
| | 2202 | const def_index = @intFromEnum(Def.defAndOp); |
| | 2203 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 2204 | p.depths[def_index] += 1; |
| | 2205 | defer p.depths[def_index] -= 1; |
| 1597 | return blk_0: { | 2206 | return blk_0: { |
| 1598 | const pos_0 = p.i; | 2207 | const pos_0 = p.i; |
| 1599 | if (try p.parsepre_op_white() and try p.parseKEYWORD_and() and try p.parsepost_op_white()) break :blk_0 true; | 2208 | if (try p.parsepre_op_white() and try p.parseKEYWORD_and() and try p.parsepost_op_white()) break :blk_0 true; |
| ... | @@ -1614,6 +2223,10 @@ const Parser = struct { | ... | @@ -1614,6 +2223,10 @@ const Parser = struct { |
| 1614 | }; | 2223 | }; |
| 1615 | } | 2224 | } |
| 1616 | pub fn parseCompareOp(p: *Parser) Error!bool { | 2225 | pub fn parseCompareOp(p: *Parser) Error!bool { |
| | 2226 | const def_index = @intFromEnum(Def.defCompareOp); |
| | 2227 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 2228 | p.depths[def_index] += 1; |
| | 2229 | defer p.depths[def_index] -= 1; |
| 1617 | return blk_0: { | 2230 | return blk_0: { |
| 1618 | const pos_0 = p.i; | 2231 | const pos_0 = p.i; |
| 1619 | if (try p.parsepre_op_white() and try p.parseCompareOpTok() and try p.parsepost_op_white()) break :blk_0 true; | 2232 | if (try p.parsepre_op_white() and try p.parseCompareOpTok() and try p.parsepost_op_white()) break :blk_0 true; |
| ... | @@ -1634,6 +2247,10 @@ const Parser = struct { | ... | @@ -1634,6 +2247,10 @@ const Parser = struct { |
| 1634 | }; | 2247 | }; |
| 1635 | } | 2248 | } |
| 1636 | pub fn parseCompareOpTok(p: *Parser) Error!bool { | 2249 | pub fn parseCompareOpTok(p: *Parser) Error!bool { |
| | 2250 | const def_index = @intFromEnum(Def.defCompareOpTok); |
| | 2251 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 2252 | p.depths[def_index] += 1; |
| | 2253 | defer p.depths[def_index] -= 1; |
| 1637 | return blk_0: { | 2254 | return blk_0: { |
| 1638 | const pos_0 = p.i; | 2255 | const pos_0 = p.i; |
| 1639 | if (try p.parseEQUALEQUAL()) break :blk_0 true; | 2256 | if (try p.parseEQUALEQUAL()) break :blk_0 true; |
| ... | @@ -1652,6 +2269,10 @@ const Parser = struct { | ... | @@ -1652,6 +2269,10 @@ const Parser = struct { |
| 1652 | }; | 2269 | }; |
| 1653 | } | 2270 | } |
| 1654 | pub fn parseBitwiseOp(p: *Parser) Error!bool { | 2271 | pub fn parseBitwiseOp(p: *Parser) Error!bool { |
| | 2272 | const def_index = @intFromEnum(Def.defBitwiseOp); |
| | 2273 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 2274 | p.depths[def_index] += 1; |
| | 2275 | defer p.depths[def_index] -= 1; |
| 1655 | return blk_0: { | 2276 | return blk_0: { |
| 1656 | const pos_0 = p.i; | 2277 | const pos_0 = p.i; |
| 1657 | if (try p.parsepre_op_white() and try p.parseBitwiseOpTok() and try p.parsepost_op_white()) break :blk_0 true; | 2278 | if (try p.parsepre_op_white() and try p.parseBitwiseOpTok() and try p.parsepost_op_white()) break :blk_0 true; |
| ... | @@ -1686,6 +2307,10 @@ const Parser = struct { | ... | @@ -1686,6 +2307,10 @@ const Parser = struct { |
| 1686 | }; | 2307 | }; |
| 1687 | } | 2308 | } |
| 1688 | pub fn parseBitwiseOpTok(p: *Parser) Error!bool { | 2309 | pub fn parseBitwiseOpTok(p: *Parser) Error!bool { |
| | 2310 | const def_index = @intFromEnum(Def.defBitwiseOpTok); |
| | 2311 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 2312 | p.depths[def_index] += 1; |
| | 2313 | defer p.depths[def_index] -= 1; |
| 1689 | return blk_0: { | 2314 | return blk_0: { |
| 1690 | const pos_0 = p.i; | 2315 | const pos_0 = p.i; |
| 1691 | if (try p.parseAMPERSAND() and blk_1: { | 2316 | if (try p.parseAMPERSAND() and blk_1: { |
| ... | @@ -1712,6 +2337,10 @@ const Parser = struct { | ... | @@ -1712,6 +2337,10 @@ const Parser = struct { |
| 1712 | }; | 2337 | }; |
| 1713 | } | 2338 | } |
| 1714 | pub fn parseBitShiftOp(p: *Parser) Error!bool { | 2339 | pub fn parseBitShiftOp(p: *Parser) Error!bool { |
| | 2340 | const def_index = @intFromEnum(Def.defBitShiftOp); |
| | 2341 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 2342 | p.depths[def_index] += 1; |
| | 2343 | defer p.depths[def_index] -= 1; |
| 1715 | return blk_0: { | 2344 | return blk_0: { |
| 1716 | const pos_0 = p.i; | 2345 | const pos_0 = p.i; |
| 1717 | if (try p.parsepre_op_white() and try p.parseBitShiftOpTok() and try p.parsepost_op_white()) break :blk_0 true; | 2346 | if (try p.parsepre_op_white() and try p.parseBitShiftOpTok() and try p.parsepost_op_white()) break :blk_0 true; |
| ... | @@ -1732,6 +2361,10 @@ const Parser = struct { | ... | @@ -1732,6 +2361,10 @@ const Parser = struct { |
| 1732 | }; | 2361 | }; |
| 1733 | } | 2362 | } |
| 1734 | pub fn parseBitShiftOpTok(p: *Parser) Error!bool { | 2363 | pub fn parseBitShiftOpTok(p: *Parser) Error!bool { |
| | 2364 | const def_index = @intFromEnum(Def.defBitShiftOpTok); |
| | 2365 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 2366 | p.depths[def_index] += 1; |
| | 2367 | defer p.depths[def_index] -= 1; |
| 1735 | return blk_0: { | 2368 | return blk_0: { |
| 1736 | const pos_0 = p.i; | 2369 | const pos_0 = p.i; |
| 1737 | if (try p.parseLARROW2()) break :blk_0 true; | 2370 | if (try p.parseLARROW2()) break :blk_0 true; |
| ... | @@ -1744,6 +2377,10 @@ const Parser = struct { | ... | @@ -1744,6 +2377,10 @@ const Parser = struct { |
| 1744 | }; | 2377 | }; |
| 1745 | } | 2378 | } |
| 1746 | pub fn parseAdditionOp(p: *Parser) Error!bool { | 2379 | pub fn parseAdditionOp(p: *Parser) Error!bool { |
| | 2380 | const def_index = @intFromEnum(Def.defAdditionOp); |
| | 2381 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 2382 | p.depths[def_index] += 1; |
| | 2383 | defer p.depths[def_index] -= 1; |
| 1747 | return blk_0: { | 2384 | return blk_0: { |
| 1748 | const pos_0 = p.i; | 2385 | const pos_0 = p.i; |
| 1749 | if (try p.parsepre_op_white() and try p.parseAdditionOpTok() and try p.parsepost_op_white()) break :blk_0 true; | 2386 | if (try p.parsepre_op_white() and try p.parseAdditionOpTok() and try p.parsepost_op_white()) break :blk_0 true; |
| ... | @@ -1764,6 +2401,10 @@ const Parser = struct { | ... | @@ -1764,6 +2401,10 @@ const Parser = struct { |
| 1764 | }; | 2401 | }; |
| 1765 | } | 2402 | } |
| 1766 | pub fn parseAdditionOpTok(p: *Parser) Error!bool { | 2403 | pub fn parseAdditionOpTok(p: *Parser) Error!bool { |
| | 2404 | const def_index = @intFromEnum(Def.defAdditionOpTok); |
| | 2405 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 2406 | p.depths[def_index] += 1; |
| | 2407 | defer p.depths[def_index] -= 1; |
| 1767 | return blk_0: { | 2408 | return blk_0: { |
| 1768 | const pos_0 = p.i; | 2409 | const pos_0 = p.i; |
| 1769 | if (try p.parsePLUS()) break :blk_0 true; | 2410 | if (try p.parsePLUS()) break :blk_0 true; |
| ... | @@ -1784,6 +2425,10 @@ const Parser = struct { | ... | @@ -1784,6 +2425,10 @@ const Parser = struct { |
| 1784 | }; | 2425 | }; |
| 1785 | } | 2426 | } |
| 1786 | pub fn parseMultiplyOp(p: *Parser) Error!bool { | 2427 | pub fn parseMultiplyOp(p: *Parser) Error!bool { |
| | 2428 | const def_index = @intFromEnum(Def.defMultiplyOp); |
| | 2429 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 2430 | p.depths[def_index] += 1; |
| | 2431 | defer p.depths[def_index] -= 1; |
| 1787 | return blk_0: { | 2432 | return blk_0: { |
| 1788 | const pos_0 = p.i; | 2433 | const pos_0 = p.i; |
| 1789 | if (try p.parsepre_op_white() and try p.parseMultiplyOpTok() and try p.parsepost_op_white()) break :blk_0 true; | 2434 | if (try p.parsepre_op_white() and try p.parseMultiplyOpTok() and try p.parsepost_op_white()) break :blk_0 true; |
| ... | @@ -1804,6 +2449,10 @@ const Parser = struct { | ... | @@ -1804,6 +2449,10 @@ const Parser = struct { |
| 1804 | }; | 2449 | }; |
| 1805 | } | 2450 | } |
| 1806 | pub fn parseMultiplyOpTok(p: *Parser) Error!bool { | 2451 | pub fn parseMultiplyOpTok(p: *Parser) Error!bool { |
| | 2452 | const def_index = @intFromEnum(Def.defMultiplyOpTok); |
| | 2453 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 2454 | p.depths[def_index] += 1; |
| | 2455 | defer p.depths[def_index] -= 1; |
| 1807 | return blk_0: { | 2456 | return blk_0: { |
| 1808 | const pos_0 = p.i; | 2457 | const pos_0 = p.i; |
| 1809 | if (try p.parsePIPE2()) break :blk_0 true; | 2458 | if (try p.parsePIPE2()) break :blk_0 true; |
| ... | @@ -1822,6 +2471,10 @@ const Parser = struct { | ... | @@ -1822,6 +2471,10 @@ const Parser = struct { |
| 1822 | }; | 2471 | }; |
| 1823 | } | 2472 | } |
| 1824 | pub fn parsePrefixOp(p: *Parser) Error!bool { | 2473 | pub fn parsePrefixOp(p: *Parser) Error!bool { |
| | 2474 | const def_index = @intFromEnum(Def.defPrefixOp); |
| | 2475 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 2476 | p.depths[def_index] += 1; |
| | 2477 | defer p.depths[def_index] -= 1; |
| 1825 | return blk_0: { | 2478 | return blk_0: { |
| 1826 | const pos_0 = p.i; | 2479 | const pos_0 = p.i; |
| 1827 | if (try p.parseEXCLAMATIONMARK()) break :blk_0 true; | 2480 | if (try p.parseEXCLAMATIONMARK()) break :blk_0 true; |
| ... | @@ -1840,6 +2493,10 @@ const Parser = struct { | ... | @@ -1840,6 +2493,10 @@ const Parser = struct { |
| 1840 | }; | 2493 | }; |
| 1841 | } | 2494 | } |
| 1842 | pub fn parsePrefixTypeOp(p: *Parser) Error!bool { | 2495 | pub fn parsePrefixTypeOp(p: *Parser) Error!bool { |
| | 2496 | const def_index = @intFromEnum(Def.defPrefixTypeOp); |
| | 2497 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 2498 | p.depths[def_index] += 1; |
| | 2499 | defer p.depths[def_index] -= 1; |
| 1843 | return blk_0: { | 2500 | return blk_0: { |
| 1844 | const pos_0 = p.i; | 2501 | const pos_0 = p.i; |
| 1845 | if (try p.parseQUESTIONMARK()) break :blk_0 true; | 2502 | if (try p.parseQUESTIONMARK()) break :blk_0 true; |
| ... | @@ -1863,6 +2520,10 @@ const Parser = struct { | ... | @@ -1863,6 +2520,10 @@ const Parser = struct { |
| 1863 | }; | 2520 | }; |
| 1864 | } | 2521 | } |
| 1865 | pub fn parsePtrMods(p: *Parser) Error!bool { | 2522 | pub fn parsePtrMods(p: *Parser) Error!bool { |
| | 2523 | const def_index = @intFromEnum(Def.defPtrMods); |
| | 2524 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 2525 | p.depths[def_index] += 1; |
| | 2526 | defer p.depths[def_index] -= 1; |
| 1866 | return blk_0: { | 2527 | return blk_0: { |
| 1867 | const pos_0 = p.i; | 2528 | const pos_0 = p.i; |
| 1868 | if (blk_1: { | 2529 | if (blk_1: { |
| ... | @@ -1925,6 +2586,10 @@ const Parser = struct { | ... | @@ -1925,6 +2586,10 @@ const Parser = struct { |
| 1925 | }; | 2586 | }; |
| 1926 | } | 2587 | } |
| 1927 | pub fn parseSinglePtrMods(p: *Parser) Error!bool { | 2588 | pub fn parseSinglePtrMods(p: *Parser) Error!bool { |
| | 2589 | const def_index = @intFromEnum(Def.defSinglePtrMods); |
| | 2590 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 2591 | p.depths[def_index] += 1; |
| | 2592 | defer p.depths[def_index] -= 1; |
| 1928 | return blk_0: { | 2593 | return blk_0: { |
| 1929 | const pos_0 = p.i; | 2594 | const pos_0 = p.i; |
| 1930 | if (blk_1: { | 2595 | if (blk_1: { |
| ... | @@ -1987,6 +2652,10 @@ const Parser = struct { | ... | @@ -1987,6 +2652,10 @@ const Parser = struct { |
| 1987 | }; | 2652 | }; |
| 1988 | } | 2653 | } |
| 1989 | pub fn parsePtrMod(p: *Parser) Error!bool { | 2654 | pub fn parsePtrMod(p: *Parser) Error!bool { |
| | 2655 | const def_index = @intFromEnum(Def.defPtrMod); |
| | 2656 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 2657 | p.depths[def_index] += 1; |
| | 2658 | defer p.depths[def_index] -= 1; |
| 1990 | return blk_0: { | 2659 | return blk_0: { |
| 1991 | const pos_0 = p.i; | 2660 | const pos_0 = p.i; |
| 1992 | if (try p.parseKEYWORD_allowzero()) break :blk_0 true; | 2661 | if (try p.parseKEYWORD_allowzero()) break :blk_0 true; |
| ... | @@ -1999,6 +2668,10 @@ const Parser = struct { | ... | @@ -1999,6 +2668,10 @@ const Parser = struct { |
| 1999 | }; | 2668 | }; |
| 2000 | } | 2669 | } |
| 2001 | pub fn parsePrefixTypeOpPrefix(p: *Parser) Error!bool { | 2670 | pub fn parsePrefixTypeOpPrefix(p: *Parser) Error!bool { |
| | 2671 | const def_index = @intFromEnum(Def.defPrefixTypeOpPrefix); |
| | 2672 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 2673 | p.depths[def_index] += 1; |
| | 2674 | defer p.depths[def_index] -= 1; |
| 2002 | return blk_0: { | 2675 | return blk_0: { |
| 2003 | const pos_0 = p.i; | 2676 | const pos_0 = p.i; |
| 2004 | if (try p.parseQUESTIONMARK()) break :blk_0 true; | 2677 | if (try p.parseQUESTIONMARK()) break :blk_0 true; |
| ... | @@ -2013,6 +2686,10 @@ const Parser = struct { | ... | @@ -2013,6 +2686,10 @@ const Parser = struct { |
| 2013 | }; | 2686 | }; |
| 2014 | } | 2687 | } |
| 2015 | pub fn parseSuffixOp(p: *Parser) Error!bool { | 2688 | pub fn parseSuffixOp(p: *Parser) Error!bool { |
| | 2689 | const def_index = @intFromEnum(Def.defSuffixOp); |
| | 2690 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 2691 | p.depths[def_index] += 1; |
| | 2692 | defer p.depths[def_index] -= 1; |
| 2016 | return blk_0: { | 2693 | return blk_0: { |
| 2017 | const pos_0 = p.i; | 2694 | const pos_0 = p.i; |
| 2018 | if (try p.parseLBRACKET() and try p.parseExpr() and (blk_3: { | 2695 | if (try p.parseLBRACKET() and try p.parseExpr() and (blk_3: { |
| ... | @@ -2051,6 +2728,10 @@ const Parser = struct { | ... | @@ -2051,6 +2728,10 @@ const Parser = struct { |
| 2051 | }; | 2728 | }; |
| 2052 | } | 2729 | } |
| 2053 | pub fn parseSuffixOpPrefix(p: *Parser) Error!bool { | 2730 | pub fn parseSuffixOpPrefix(p: *Parser) Error!bool { |
| | 2731 | const def_index = @intFromEnum(Def.defSuffixOpPrefix); |
| | 2732 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 2733 | p.depths[def_index] += 1; |
| | 2734 | defer p.depths[def_index] -= 1; |
| 2054 | return blk_0: { | 2735 | return blk_0: { |
| 2055 | const pos_0 = p.i; | 2736 | const pos_0 = p.i; |
| 2056 | if (try p.parseLBRACKET()) break :blk_0 true; | 2737 | if (try p.parseLBRACKET()) break :blk_0 true; |
| ... | @@ -2067,6 +2748,10 @@ const Parser = struct { | ... | @@ -2067,6 +2748,10 @@ const Parser = struct { |
| 2067 | }; | 2748 | }; |
| 2068 | } | 2749 | } |
| 2069 | pub fn parseFnCallArguments(p: *Parser) Error!bool { | 2750 | pub fn parseFnCallArguments(p: *Parser) Error!bool { |
| | 2751 | const def_index = @intFromEnum(Def.defFnCallArguments); |
| | 2752 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 2753 | p.depths[def_index] += 1; |
| | 2754 | defer p.depths[def_index] -= 1; |
| 2070 | return blk_0: { | 2755 | return blk_0: { |
| 2071 | const pos_0 = p.i; | 2756 | const pos_0 = p.i; |
| 2072 | if (try p.parseLPAREN() and try p.parseExprList() and try p.parseRPAREN()) break :blk_0 true; | 2757 | if (try p.parseLPAREN() and try p.parseExprList() and try p.parseRPAREN()) break :blk_0 true; |
| ... | @@ -2075,6 +2760,10 @@ const Parser = struct { | ... | @@ -2075,6 +2760,10 @@ const Parser = struct { |
| 2075 | }; | 2760 | }; |
| 2076 | } | 2761 | } |
| 2077 | pub fn parseSliceTypeStart(p: *Parser) Error!bool { | 2762 | pub fn parseSliceTypeStart(p: *Parser) Error!bool { |
| | 2763 | const def_index = @intFromEnum(Def.defSliceTypeStart); |
| | 2764 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 2765 | p.depths[def_index] += 1; |
| | 2766 | defer p.depths[def_index] -= 1; |
| 2078 | return blk_0: { | 2767 | return blk_0: { |
| 2079 | const pos_0 = p.i; | 2768 | const pos_0 = p.i; |
| 2080 | if (try p.parseLBRACKET() and (blk_3: { | 2769 | if (try p.parseLBRACKET() and (blk_3: { |
| ... | @@ -2088,6 +2777,10 @@ const Parser = struct { | ... | @@ -2088,6 +2777,10 @@ const Parser = struct { |
| 2088 | }; | 2777 | }; |
| 2089 | } | 2778 | } |
| 2090 | pub fn parseSinglePtrTypeStart(p: *Parser) Error!bool { | 2779 | pub fn parseSinglePtrTypeStart(p: *Parser) Error!bool { |
| | 2780 | const def_index = @intFromEnum(Def.defSinglePtrTypeStart); |
| | 2781 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 2782 | p.depths[def_index] += 1; |
| | 2783 | defer p.depths[def_index] -= 1; |
| 2091 | return blk_0: { | 2784 | return blk_0: { |
| 2092 | const pos_0 = p.i; | 2785 | const pos_0 = p.i; |
| 2093 | if (try p.parseASTERISK()) break :blk_0 true; | 2786 | if (try p.parseASTERISK()) break :blk_0 true; |
| ... | @@ -2096,6 +2789,10 @@ const Parser = struct { | ... | @@ -2096,6 +2789,10 @@ const Parser = struct { |
| 2096 | }; | 2789 | }; |
| 2097 | } | 2790 | } |
| 2098 | pub fn parseManyPtrTypeStart(p: *Parser) Error!bool { | 2791 | pub fn parseManyPtrTypeStart(p: *Parser) Error!bool { |
| | 2792 | const def_index = @intFromEnum(Def.defManyPtrTypeStart); |
| | 2793 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 2794 | p.depths[def_index] += 1; |
| | 2795 | defer p.depths[def_index] -= 1; |
| 2099 | return blk_0: { | 2796 | return blk_0: { |
| 2100 | const pos_0 = p.i; | 2797 | const pos_0 = p.i; |
| 2101 | if (try p.parseLBRACKET() and try p.parseASTERISK() and (blk_3: { | 2798 | if (try p.parseLBRACKET() and try p.parseASTERISK() and (blk_3: { |
| ... | @@ -2111,6 +2808,10 @@ const Parser = struct { | ... | @@ -2111,6 +2808,10 @@ const Parser = struct { |
| 2111 | }; | 2808 | }; |
| 2112 | } | 2809 | } |
| 2113 | pub fn parseArrayTypeStart(p: *Parser) Error!bool { | 2810 | pub fn parseArrayTypeStart(p: *Parser) Error!bool { |
| | 2811 | const def_index = @intFromEnum(Def.defArrayTypeStart); |
| | 2812 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 2813 | p.depths[def_index] += 1; |
| | 2814 | defer p.depths[def_index] -= 1; |
| 2114 | return blk_0: { | 2815 | return blk_0: { |
| 2115 | const pos_0 = p.i; | 2816 | const pos_0 = p.i; |
| 2116 | if (try p.parseLBRACKET() and blk_1: { | 2817 | if (try p.parseLBRACKET() and blk_1: { |
| ... | @@ -2129,6 +2830,10 @@ const Parser = struct { | ... | @@ -2129,6 +2830,10 @@ const Parser = struct { |
| 2129 | }; | 2830 | }; |
| 2130 | } | 2831 | } |
| 2131 | pub fn parseContainerTypeAuto(p: *Parser) Error!bool { | 2832 | pub fn parseContainerTypeAuto(p: *Parser) Error!bool { |
| | 2833 | const def_index = @intFromEnum(Def.defContainerTypeAuto); |
| | 2834 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 2835 | p.depths[def_index] += 1; |
| | 2836 | defer p.depths[def_index] -= 1; |
| 2132 | return blk_0: { | 2837 | return blk_0: { |
| 2133 | const pos_0 = p.i; | 2838 | const pos_0 = p.i; |
| 2134 | if (try p.parseContainerTypeKind() and try p.parseLBRACE() and try p.parseContainerMembers() and try p.parseRBRACE()) break :blk_0 true; | 2839 | if (try p.parseContainerTypeKind() and try p.parseLBRACE() and try p.parseContainerMembers() and try p.parseRBRACE()) break :blk_0 true; |
| ... | @@ -2137,6 +2842,10 @@ const Parser = struct { | ... | @@ -2137,6 +2842,10 @@ const Parser = struct { |
| 2137 | }; | 2842 | }; |
| 2138 | } | 2843 | } |
| 2139 | pub fn parseContainerTypeKind(p: *Parser) Error!bool { | 2844 | pub fn parseContainerTypeKind(p: *Parser) Error!bool { |
| | 2845 | const def_index = @intFromEnum(Def.defContainerTypeKind); |
| | 2846 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 2847 | p.depths[def_index] += 1; |
| | 2848 | defer p.depths[def_index] -= 1; |
| 2140 | return blk_0: { | 2849 | return blk_0: { |
| 2141 | const pos_0 = p.i; | 2850 | const pos_0 = p.i; |
| 2142 | if (try p.parseKEYWORD_struct() and (blk_3: { | 2851 | if (try p.parseKEYWORD_struct() and (blk_3: { |
| ... | @@ -2178,6 +2887,10 @@ const Parser = struct { | ... | @@ -2178,6 +2887,10 @@ const Parser = struct { |
| 2178 | }; | 2887 | }; |
| 2179 | } | 2888 | } |
| 2180 | pub fn parseByteAlign(p: *Parser) Error!bool { | 2889 | pub fn parseByteAlign(p: *Parser) Error!bool { |
| | 2890 | const def_index = @intFromEnum(Def.defByteAlign); |
| | 2891 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 2892 | p.depths[def_index] += 1; |
| | 2893 | defer p.depths[def_index] -= 1; |
| 2181 | return blk_0: { | 2894 | return blk_0: { |
| 2182 | const pos_0 = p.i; | 2895 | const pos_0 = p.i; |
| 2183 | if (try p.parseKEYWORD_align() and try p.parseLPAREN() and try p.parseExpr() and try p.parseRPAREN()) break :blk_0 true; | 2896 | if (try p.parseKEYWORD_align() and try p.parseLPAREN() and try p.parseExpr() and try p.parseRPAREN()) break :blk_0 true; |
| ... | @@ -2186,6 +2899,10 @@ const Parser = struct { | ... | @@ -2186,6 +2899,10 @@ const Parser = struct { |
| 2186 | }; | 2899 | }; |
| 2187 | } | 2900 | } |
| 2188 | pub fn parseBitAlign(p: *Parser) Error!bool { | 2901 | pub fn parseBitAlign(p: *Parser) Error!bool { |
| | 2902 | const def_index = @intFromEnum(Def.defBitAlign); |
| | 2903 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 2904 | p.depths[def_index] += 1; |
| | 2905 | defer p.depths[def_index] -= 1; |
| 2189 | return blk_0: { | 2906 | return blk_0: { |
| 2190 | const pos_0 = p.i; | 2907 | const pos_0 = p.i; |
| 2191 | if (try p.parseKEYWORD_align() and try p.parseLPAREN() and try p.parseExpr() and (blk_3: { | 2908 | if (try p.parseKEYWORD_align() and try p.parseLPAREN() and try p.parseExpr() and (blk_3: { |
| ... | @@ -2199,6 +2916,10 @@ const Parser = struct { | ... | @@ -2199,6 +2916,10 @@ const Parser = struct { |
| 2199 | }; | 2916 | }; |
| 2200 | } | 2917 | } |
| 2201 | pub fn parseIdentifierList(p: *Parser) Error!bool { | 2918 | pub fn parseIdentifierList(p: *Parser) Error!bool { |
| | 2919 | const def_index = @intFromEnum(Def.defIdentifierList); |
| | 2920 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 2921 | p.depths[def_index] += 1; |
| | 2922 | defer p.depths[def_index] -= 1; |
| 2202 | return blk_0: { | 2923 | return blk_0: { |
| 2203 | const pos_0 = p.i; | 2924 | const pos_0 = p.i; |
| 2204 | if (blk_1: { | 2925 | if (blk_1: { |
| ... | @@ -2224,6 +2945,10 @@ const Parser = struct { | ... | @@ -2224,6 +2945,10 @@ const Parser = struct { |
| 2224 | }; | 2945 | }; |
| 2225 | } | 2946 | } |
| 2226 | pub fn parseSwitchProngList(p: *Parser) Error!bool { | 2947 | pub fn parseSwitchProngList(p: *Parser) Error!bool { |
| | 2948 | const def_index = @intFromEnum(Def.defSwitchProngList); |
| | 2949 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 2950 | p.depths[def_index] += 1; |
| | 2951 | defer p.depths[def_index] -= 1; |
| 2227 | return blk_0: { | 2952 | return blk_0: { |
| 2228 | const pos_0 = p.i; | 2953 | const pos_0 = p.i; |
| 2229 | if (blk_1: { | 2954 | if (blk_1: { |
| ... | @@ -2244,6 +2969,10 @@ const Parser = struct { | ... | @@ -2244,6 +2969,10 @@ const Parser = struct { |
| 2244 | }; | 2969 | }; |
| 2245 | } | 2970 | } |
| 2246 | pub fn parseAsmOutputList(p: *Parser) Error!bool { | 2971 | pub fn parseAsmOutputList(p: *Parser) Error!bool { |
| | 2972 | const def_index = @intFromEnum(Def.defAsmOutputList); |
| | 2973 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 2974 | p.depths[def_index] += 1; |
| | 2975 | defer p.depths[def_index] -= 1; |
| 2247 | return blk_0: { | 2976 | return blk_0: { |
| 2248 | const pos_0 = p.i; | 2977 | const pos_0 = p.i; |
| 2249 | if (blk_1: { | 2978 | if (blk_1: { |
| ... | @@ -2264,6 +2993,10 @@ const Parser = struct { | ... | @@ -2264,6 +2993,10 @@ const Parser = struct { |
| 2264 | }; | 2993 | }; |
| 2265 | } | 2994 | } |
| 2266 | pub fn parseAsmInputList(p: *Parser) Error!bool { | 2995 | pub fn parseAsmInputList(p: *Parser) Error!bool { |
| | 2996 | const def_index = @intFromEnum(Def.defAsmInputList); |
| | 2997 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 2998 | p.depths[def_index] += 1; |
| | 2999 | defer p.depths[def_index] -= 1; |
| 2267 | return blk_0: { | 3000 | return blk_0: { |
| 2268 | const pos_0 = p.i; | 3001 | const pos_0 = p.i; |
| 2269 | if (blk_1: { | 3002 | if (blk_1: { |
| ... | @@ -2284,6 +3017,10 @@ const Parser = struct { | ... | @@ -2284,6 +3017,10 @@ const Parser = struct { |
| 2284 | }; | 3017 | }; |
| 2285 | } | 3018 | } |
| 2286 | pub fn parseParamDeclList(p: *Parser) Error!bool { | 3019 | pub fn parseParamDeclList(p: *Parser) Error!bool { |
| | 3020 | const def_index = @intFromEnum(Def.defParamDeclList); |
| | 3021 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 3022 | p.depths[def_index] += 1; |
| | 3023 | defer p.depths[def_index] -= 1; |
| 2287 | return blk_0: { | 3024 | return blk_0: { |
| 2288 | const pos_0 = p.i; | 3025 | const pos_0 = p.i; |
| 2289 | if (try p.parseLPAREN() and try p.parseParamDeclListRest()) break :blk_0 true; | 3026 | if (try p.parseLPAREN() and try p.parseParamDeclListRest()) break :blk_0 true; |
| ... | @@ -2292,6 +3029,10 @@ const Parser = struct { | ... | @@ -2292,6 +3029,10 @@ const Parser = struct { |
| 2292 | }; | 3029 | }; |
| 2293 | } | 3030 | } |
| 2294 | pub fn parseParamDeclListRest(p: *Parser) Error!bool { | 3031 | pub fn parseParamDeclListRest(p: *Parser) Error!bool { |
| | 3032 | const def_index = @intFromEnum(Def.defParamDeclListRest); |
| | 3033 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 3034 | p.depths[def_index] += 1; |
| | 3035 | defer p.depths[def_index] -= 1; |
| 2295 | return blk_0: { | 3036 | return blk_0: { |
| 2296 | const pos_0 = p.i; | 3037 | const pos_0 = p.i; |
| 2297 | if (try p.parseRPAREN()) break :blk_0 true; | 3038 | if (try p.parseRPAREN()) break :blk_0 true; |
| ... | @@ -2311,6 +3052,10 @@ const Parser = struct { | ... | @@ -2311,6 +3052,10 @@ const Parser = struct { |
| 2311 | }; | 3052 | }; |
| 2312 | } | 3053 | } |
| 2313 | pub fn parseExprList(p: *Parser) Error!bool { | 3054 | pub fn parseExprList(p: *Parser) Error!bool { |
| | 3055 | const def_index = @intFromEnum(Def.defExprList); |
| | 3056 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 3057 | p.depths[def_index] += 1; |
| | 3058 | defer p.depths[def_index] -= 1; |
| 2314 | return blk_0: { | 3059 | return blk_0: { |
| 2315 | const pos_0 = p.i; | 3060 | const pos_0 = p.i; |
| 2316 | if (blk_1: { | 3061 | if (blk_1: { |
| ... | @@ -2343,6 +3088,10 @@ const Parser = struct { | ... | @@ -2343,6 +3088,10 @@ const Parser = struct { |
| 2343 | }; | 3088 | }; |
| 2344 | } | 3089 | } |
| 2345 | pub fn parseExprPrefix(p: *Parser) Error!bool { | 3090 | pub fn parseExprPrefix(p: *Parser) Error!bool { |
| | 3091 | const def_index = @intFromEnum(Def.defExprPrefix); |
| | 3092 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 3093 | p.depths[def_index] += 1; |
| | 3094 | defer p.depths[def_index] -= 1; |
| 2346 | return blk_0: { | 3095 | return blk_0: { |
| 2347 | const pos_0 = p.i; | 3096 | const pos_0 = p.i; |
| 2348 | if (try p.parseASTERISK()) break :blk_0 true; | 3097 | if (try p.parseASTERISK()) break :blk_0 true; |
| ... | @@ -2351,6 +3100,10 @@ const Parser = struct { | ... | @@ -2351,6 +3100,10 @@ const Parser = struct { |
| 2351 | }; | 3100 | }; |
| 2352 | } | 3101 | } |
| 2353 | pub fn parsebyte_order_mark(p: *Parser) Error!bool { | 3102 | pub fn parsebyte_order_mark(p: *Parser) Error!bool { |
| | 3103 | const def_index = @intFromEnum(Def.defbyte_order_mark); |
| | 3104 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 3105 | p.depths[def_index] += 1; |
| | 3106 | defer p.depths[def_index] -= 1; |
| 2354 | return blk_0: { | 3107 | return blk_0: { |
| 2355 | const pos_0 = p.i; | 3108 | const pos_0 = p.i; |
| 2356 | if (blk_1: { | 3109 | if (blk_1: { |
| ... | @@ -2365,6 +3118,10 @@ const Parser = struct { | ... | @@ -2365,6 +3118,10 @@ const Parser = struct { |
| 2365 | }; | 3118 | }; |
| 2366 | } | 3119 | } |
| 2367 | pub fn parsesof(p: *Parser) Error!bool { | 3120 | pub fn parsesof(p: *Parser) Error!bool { |
| | 3121 | const def_index = @intFromEnum(Def.defsof); |
| | 3122 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 3123 | p.depths[def_index] += 1; |
| | 3124 | defer p.depths[def_index] -= 1; |
| 2368 | return blk_0: { | 3125 | return blk_0: { |
| 2369 | const pos_0 = p.i; | 3126 | const pos_0 = p.i; |
| 2370 | if ((p.i == 0) and (try p.parsebyte_order_mark() or true)) break :blk_0 true; | 3127 | if ((p.i == 0) and (try p.parsebyte_order_mark() or true)) break :blk_0 true; |
| ... | @@ -2373,6 +3130,10 @@ const Parser = struct { | ... | @@ -2373,6 +3130,10 @@ const Parser = struct { |
| 2373 | }; | 3130 | }; |
| 2374 | } | 3131 | } |
| 2375 | pub fn parseeof(p: *Parser) Error!bool { | 3132 | pub fn parseeof(p: *Parser) Error!bool { |
| | 3133 | const def_index = @intFromEnum(Def.defeof); |
| | 3134 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 3135 | p.depths[def_index] += 1; |
| | 3136 | defer p.depths[def_index] -= 1; |
| 2376 | return blk_0: { | 3137 | return blk_0: { |
| 2377 | const pos_0 = p.i; | 3138 | const pos_0 = p.i; |
| 2378 | if (blk_1: { | 3139 | if (blk_1: { |
| ... | @@ -2392,6 +3153,10 @@ const Parser = struct { | ... | @@ -2392,6 +3153,10 @@ const Parser = struct { |
| 2392 | }; | 3153 | }; |
| 2393 | } | 3154 | } |
| 2394 | pub fn parseox80_oxBF(p: *Parser) Error!bool { | 3155 | pub fn parseox80_oxBF(p: *Parser) Error!bool { |
| | 3156 | const def_index = @intFromEnum(Def.defox80_oxBF); |
| | 3157 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 3158 | p.depths[def_index] += 1; |
| | 3159 | defer p.depths[def_index] -= 1; |
| 2395 | return blk_0: { | 3160 | return blk_0: { |
| 2396 | const pos_0 = p.i; | 3161 | const pos_0 = p.i; |
| 2397 | if ((p.i < p.source.len and switch (p.source[p.i]) { | 3162 | if ((p.i < p.source.len and switch (p.source[p.i]) { |
| ... | @@ -2407,6 +3172,10 @@ const Parser = struct { | ... | @@ -2407,6 +3172,10 @@ const Parser = struct { |
| 2407 | }; | 3172 | }; |
| 2408 | } | 3173 | } |
| 2409 | pub fn parseoxF4(p: *Parser) Error!bool { | 3174 | pub fn parseoxF4(p: *Parser) Error!bool { |
| | 3175 | const def_index = @intFromEnum(Def.defoxF4); |
| | 3176 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 3177 | p.depths[def_index] += 1; |
| | 3178 | defer p.depths[def_index] -= 1; |
| 2410 | return blk_0: { | 3179 | return blk_0: { |
| 2411 | const pos_0 = p.i; | 3180 | const pos_0 = p.i; |
| 2412 | if (blk_1: { | 3181 | if (blk_1: { |
| ... | @@ -2421,6 +3190,10 @@ const Parser = struct { | ... | @@ -2421,6 +3190,10 @@ const Parser = struct { |
| 2421 | }; | 3190 | }; |
| 2422 | } | 3191 | } |
| 2423 | pub fn parseox80_ox8F(p: *Parser) Error!bool { | 3192 | pub fn parseox80_ox8F(p: *Parser) Error!bool { |
| | 3193 | const def_index = @intFromEnum(Def.defox80_ox8F); |
| | 3194 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 3195 | p.depths[def_index] += 1; |
| | 3196 | defer p.depths[def_index] -= 1; |
| 2424 | return blk_0: { | 3197 | return blk_0: { |
| 2425 | const pos_0 = p.i; | 3198 | const pos_0 = p.i; |
| 2426 | if ((p.i < p.source.len and switch (p.source[p.i]) { | 3199 | if ((p.i < p.source.len and switch (p.source[p.i]) { |
| ... | @@ -2436,6 +3209,10 @@ const Parser = struct { | ... | @@ -2436,6 +3209,10 @@ const Parser = struct { |
| 2436 | }; | 3209 | }; |
| 2437 | } | 3210 | } |
| 2438 | pub fn parseoxF1_oxF3(p: *Parser) Error!bool { | 3211 | pub fn parseoxF1_oxF3(p: *Parser) Error!bool { |
| | 3212 | const def_index = @intFromEnum(Def.defoxF1_oxF3); |
| | 3213 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 3214 | p.depths[def_index] += 1; |
| | 3215 | defer p.depths[def_index] -= 1; |
| 2439 | return blk_0: { | 3216 | return blk_0: { |
| 2440 | const pos_0 = p.i; | 3217 | const pos_0 = p.i; |
| 2441 | if ((p.i < p.source.len and switch (p.source[p.i]) { | 3218 | if ((p.i < p.source.len and switch (p.source[p.i]) { |
| ... | @@ -2451,6 +3228,10 @@ const Parser = struct { | ... | @@ -2451,6 +3228,10 @@ const Parser = struct { |
| 2451 | }; | 3228 | }; |
| 2452 | } | 3229 | } |
| 2453 | pub fn parseoxF0(p: *Parser) Error!bool { | 3230 | pub fn parseoxF0(p: *Parser) Error!bool { |
| | 3231 | const def_index = @intFromEnum(Def.defoxF0); |
| | 3232 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 3233 | p.depths[def_index] += 1; |
| | 3234 | defer p.depths[def_index] -= 1; |
| 2454 | return blk_0: { | 3235 | return blk_0: { |
| 2455 | const pos_0 = p.i; | 3236 | const pos_0 = p.i; |
| 2456 | if (blk_1: { | 3237 | if (blk_1: { |
| ... | @@ -2465,6 +3246,10 @@ const Parser = struct { | ... | @@ -2465,6 +3246,10 @@ const Parser = struct { |
| 2465 | }; | 3246 | }; |
| 2466 | } | 3247 | } |
| 2467 | pub fn parseox90_0xBF(p: *Parser) Error!bool { | 3248 | pub fn parseox90_0xBF(p: *Parser) Error!bool { |
| | 3249 | const def_index = @intFromEnum(Def.defox90_0xBF); |
| | 3250 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 3251 | p.depths[def_index] += 1; |
| | 3252 | defer p.depths[def_index] -= 1; |
| 2468 | return blk_0: { | 3253 | return blk_0: { |
| 2469 | const pos_0 = p.i; | 3254 | const pos_0 = p.i; |
| 2470 | if ((p.i < p.source.len and switch (p.source[p.i]) { | 3255 | if ((p.i < p.source.len and switch (p.source[p.i]) { |
| ... | @@ -2480,6 +3265,10 @@ const Parser = struct { | ... | @@ -2480,6 +3265,10 @@ const Parser = struct { |
| 2480 | }; | 3265 | }; |
| 2481 | } | 3266 | } |
| 2482 | pub fn parseoxEE_oxEF(p: *Parser) Error!bool { | 3267 | pub fn parseoxEE_oxEF(p: *Parser) Error!bool { |
| | 3268 | const def_index = @intFromEnum(Def.defoxEE_oxEF); |
| | 3269 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 3270 | p.depths[def_index] += 1; |
| | 3271 | defer p.depths[def_index] -= 1; |
| 2483 | return blk_0: { | 3272 | return blk_0: { |
| 2484 | const pos_0 = p.i; | 3273 | const pos_0 = p.i; |
| 2485 | if ((p.i < p.source.len and switch (p.source[p.i]) { | 3274 | if ((p.i < p.source.len and switch (p.source[p.i]) { |
| ... | @@ -2495,6 +3284,10 @@ const Parser = struct { | ... | @@ -2495,6 +3284,10 @@ const Parser = struct { |
| 2495 | }; | 3284 | }; |
| 2496 | } | 3285 | } |
| 2497 | pub fn parseoxED(p: *Parser) Error!bool { | 3286 | pub fn parseoxED(p: *Parser) Error!bool { |
| | 3287 | const def_index = @intFromEnum(Def.defoxED); |
| | 3288 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 3289 | p.depths[def_index] += 1; |
| | 3290 | defer p.depths[def_index] -= 1; |
| 2498 | return blk_0: { | 3291 | return blk_0: { |
| 2499 | const pos_0 = p.i; | 3292 | const pos_0 = p.i; |
| 2500 | if (blk_1: { | 3293 | if (blk_1: { |
| ... | @@ -2509,6 +3302,10 @@ const Parser = struct { | ... | @@ -2509,6 +3302,10 @@ const Parser = struct { |
| 2509 | }; | 3302 | }; |
| 2510 | } | 3303 | } |
| 2511 | pub fn parseox80_ox9F(p: *Parser) Error!bool { | 3304 | pub fn parseox80_ox9F(p: *Parser) Error!bool { |
| | 3305 | const def_index = @intFromEnum(Def.defox80_ox9F); |
| | 3306 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 3307 | p.depths[def_index] += 1; |
| | 3308 | defer p.depths[def_index] -= 1; |
| 2512 | return blk_0: { | 3309 | return blk_0: { |
| 2513 | const pos_0 = p.i; | 3310 | const pos_0 = p.i; |
| 2514 | if ((p.i < p.source.len and switch (p.source[p.i]) { | 3311 | if ((p.i < p.source.len and switch (p.source[p.i]) { |
| ... | @@ -2524,6 +3321,10 @@ const Parser = struct { | ... | @@ -2524,6 +3321,10 @@ const Parser = struct { |
| 2524 | }; | 3321 | }; |
| 2525 | } | 3322 | } |
| 2526 | pub fn parseoxE1_oxEC(p: *Parser) Error!bool { | 3323 | pub fn parseoxE1_oxEC(p: *Parser) Error!bool { |
| | 3324 | const def_index = @intFromEnum(Def.defoxE1_oxEC); |
| | 3325 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 3326 | p.depths[def_index] += 1; |
| | 3327 | defer p.depths[def_index] -= 1; |
| 2527 | return blk_0: { | 3328 | return blk_0: { |
| 2528 | const pos_0 = p.i; | 3329 | const pos_0 = p.i; |
| 2529 | if ((p.i < p.source.len and switch (p.source[p.i]) { | 3330 | if ((p.i < p.source.len and switch (p.source[p.i]) { |
| ... | @@ -2539,6 +3340,10 @@ const Parser = struct { | ... | @@ -2539,6 +3340,10 @@ const Parser = struct { |
| 2539 | }; | 3340 | }; |
| 2540 | } | 3341 | } |
| 2541 | pub fn parseoxE0(p: *Parser) Error!bool { | 3342 | pub fn parseoxE0(p: *Parser) Error!bool { |
| | 3343 | const def_index = @intFromEnum(Def.defoxE0); |
| | 3344 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 3345 | p.depths[def_index] += 1; |
| | 3346 | defer p.depths[def_index] -= 1; |
| 2542 | return blk_0: { | 3347 | return blk_0: { |
| 2543 | const pos_0 = p.i; | 3348 | const pos_0 = p.i; |
| 2544 | if (blk_1: { | 3349 | if (blk_1: { |
| ... | @@ -2553,6 +3358,10 @@ const Parser = struct { | ... | @@ -2553,6 +3358,10 @@ const Parser = struct { |
| 2553 | }; | 3358 | }; |
| 2554 | } | 3359 | } |
| 2555 | pub fn parseoxA0_oxBF(p: *Parser) Error!bool { | 3360 | pub fn parseoxA0_oxBF(p: *Parser) Error!bool { |
| | 3361 | const def_index = @intFromEnum(Def.defoxA0_oxBF); |
| | 3362 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 3363 | p.depths[def_index] += 1; |
| | 3364 | defer p.depths[def_index] -= 1; |
| 2556 | return blk_0: { | 3365 | return blk_0: { |
| 2557 | const pos_0 = p.i; | 3366 | const pos_0 = p.i; |
| 2558 | if ((p.i < p.source.len and switch (p.source[p.i]) { | 3367 | if ((p.i < p.source.len and switch (p.source[p.i]) { |
| ... | @@ -2568,6 +3377,10 @@ const Parser = struct { | ... | @@ -2568,6 +3377,10 @@ const Parser = struct { |
| 2568 | }; | 3377 | }; |
| 2569 | } | 3378 | } |
| 2570 | pub fn parseoxC2_oxDF(p: *Parser) Error!bool { | 3379 | pub fn parseoxC2_oxDF(p: *Parser) Error!bool { |
| | 3380 | const def_index = @intFromEnum(Def.defoxC2_oxDF); |
| | 3381 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 3382 | p.depths[def_index] += 1; |
| | 3383 | defer p.depths[def_index] -= 1; |
| 2571 | return blk_0: { | 3384 | return blk_0: { |
| 2572 | const pos_0 = p.i; | 3385 | const pos_0 = p.i; |
| 2573 | if ((p.i < p.source.len and switch (p.source[p.i]) { | 3386 | if ((p.i < p.source.len and switch (p.source[p.i]) { |
| ... | @@ -2583,6 +3396,10 @@ const Parser = struct { | ... | @@ -2583,6 +3396,10 @@ const Parser = struct { |
| 2583 | }; | 3396 | }; |
| 2584 | } | 3397 | } |
| 2585 | pub fn parsemultibyte_utf8(p: *Parser) Error!bool { | 3398 | pub fn parsemultibyte_utf8(p: *Parser) Error!bool { |
| | 3399 | const def_index = @intFromEnum(Def.defmultibyte_utf8); |
| | 3400 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 3401 | p.depths[def_index] += 1; |
| | 3402 | defer p.depths[def_index] -= 1; |
| 2586 | return blk_0: { | 3403 | return blk_0: { |
| 2587 | const pos_0 = p.i; | 3404 | const pos_0 = p.i; |
| 2588 | if (try p.parseoxF4() and try p.parseox80_ox8F() and try p.parseox80_oxBF() and try p.parseox80_oxBF()) break :blk_0 true; | 3405 | if (try p.parseoxF4() and try p.parseox80_ox8F() and try p.parseox80_oxBF() and try p.parseox80_oxBF()) break :blk_0 true; |
| ... | @@ -2605,6 +3422,10 @@ const Parser = struct { | ... | @@ -2605,6 +3422,10 @@ const Parser = struct { |
| 2605 | }; | 3422 | }; |
| 2606 | } | 3423 | } |
| 2607 | pub fn parsenon_control_ascii(p: *Parser) Error!bool { | 3424 | pub fn parsenon_control_ascii(p: *Parser) Error!bool { |
| | 3425 | const def_index = @intFromEnum(Def.defnon_control_ascii); |
| | 3426 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 3427 | p.depths[def_index] += 1; |
| | 3428 | defer p.depths[def_index] -= 1; |
| 2608 | return blk_0: { | 3429 | return blk_0: { |
| 2609 | const pos_0 = p.i; | 3430 | const pos_0 = p.i; |
| 2610 | if ((p.i < p.source.len and switch (p.source[p.i]) { | 3431 | if ((p.i < p.source.len and switch (p.source[p.i]) { |
| ... | @@ -2620,6 +3441,10 @@ const Parser = struct { | ... | @@ -2620,6 +3441,10 @@ const Parser = struct { |
| 2620 | }; | 3441 | }; |
| 2621 | } | 3442 | } |
| 2622 | pub fn parsenon_control_utf8(p: *Parser) Error!bool { | 3443 | pub fn parsenon_control_utf8(p: *Parser) Error!bool { |
| | 3444 | const def_index = @intFromEnum(Def.defnon_control_utf8); |
| | 3445 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 3446 | p.depths[def_index] += 1; |
| | 3447 | defer p.depths[def_index] -= 1; |
| 2623 | return blk_0: { | 3448 | return blk_0: { |
| 2624 | const pos_0 = p.i; | 3449 | const pos_0 = p.i; |
| 2625 | if ((p.i < p.source.len and switch (p.source[p.i]) { | 3450 | if ((p.i < p.source.len and switch (p.source[p.i]) { |
| ... | @@ -2636,6 +3461,10 @@ const Parser = struct { | ... | @@ -2636,6 +3461,10 @@ const Parser = struct { |
| 2636 | }; | 3461 | }; |
| 2637 | } | 3462 | } |
| 2638 | pub fn parsechar_char(p: *Parser) Error!bool { | 3463 | pub fn parsechar_char(p: *Parser) Error!bool { |
| | 3464 | const def_index = @intFromEnum(Def.defchar_char); |
| | 3465 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 3466 | p.depths[def_index] += 1; |
| | 3467 | defer p.depths[def_index] -= 1; |
| 2639 | return blk_0: { | 3468 | return blk_0: { |
| 2640 | const pos_0 = p.i; | 3469 | const pos_0 = p.i; |
| 2641 | if (blk_1: { | 3470 | if (blk_1: { |
| ... | @@ -2672,6 +3501,10 @@ const Parser = struct { | ... | @@ -2672,6 +3501,10 @@ const Parser = struct { |
| 2672 | }; | 3501 | }; |
| 2673 | } | 3502 | } |
| 2674 | pub fn parsestring_char(p: *Parser) Error!bool { | 3503 | pub fn parsestring_char(p: *Parser) Error!bool { |
| | 3504 | const def_index = @intFromEnum(Def.defstring_char); |
| | 3505 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 3506 | p.depths[def_index] += 1; |
| | 3507 | defer p.depths[def_index] -= 1; |
| 2675 | return blk_0: { | 3508 | return blk_0: { |
| 2676 | const pos_0 = p.i; | 3509 | const pos_0 = p.i; |
| 2677 | if (blk_1: { | 3510 | if (blk_1: { |
| ... | @@ -2708,6 +3541,10 @@ const Parser = struct { | ... | @@ -2708,6 +3541,10 @@ const Parser = struct { |
| 2708 | }; | 3541 | }; |
| 2709 | } | 3542 | } |
| 2710 | pub fn parsecontainer_doc_comment(p: *Parser) Error!bool { | 3543 | pub fn parsecontainer_doc_comment(p: *Parser) Error!bool { |
| | 3544 | const def_index = @intFromEnum(Def.defcontainer_doc_comment); |
| | 3545 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 3546 | p.depths[def_index] += 1; |
| | 3547 | defer p.depths[def_index] -= 1; |
| 2711 | return blk_0: { | 3548 | return blk_0: { |
| 2712 | const pos_0 = p.i; | 3549 | const pos_0 = p.i; |
| 2713 | if (blk_1: { | 3550 | if (blk_1: { |
| ... | @@ -2743,6 +3580,10 @@ const Parser = struct { | ... | @@ -2743,6 +3580,10 @@ const Parser = struct { |
| 2743 | }; | 3580 | }; |
| 2744 | } | 3581 | } |
| 2745 | pub fn parsedoc_comment(p: *Parser) Error!bool { | 3582 | pub fn parsedoc_comment(p: *Parser) Error!bool { |
| | 3583 | const def_index = @intFromEnum(Def.defdoc_comment); |
| | 3584 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 3585 | p.depths[def_index] += 1; |
| | 3586 | defer p.depths[def_index] -= 1; |
| 2746 | return blk_0: { | 3587 | return blk_0: { |
| 2747 | const pos_0 = p.i; | 3588 | const pos_0 = p.i; |
| 2748 | if (blk_2: { | 3589 | if (blk_2: { |
| ... | @@ -2785,6 +3626,10 @@ const Parser = struct { | ... | @@ -2785,6 +3626,10 @@ const Parser = struct { |
| 2785 | }; | 3626 | }; |
| 2786 | } | 3627 | } |
| 2787 | pub fn parseline_comment(p: *Parser) Error!bool { | 3628 | pub fn parseline_comment(p: *Parser) Error!bool { |
| | 3629 | const def_index = @intFromEnum(Def.defline_comment); |
| | 3630 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 3631 | p.depths[def_index] += 1; |
| | 3632 | defer p.depths[def_index] -= 1; |
| 2788 | return blk_0: { | 3633 | return blk_0: { |
| 2789 | const pos_0 = p.i; | 3634 | const pos_0 = p.i; |
| 2790 | if (blk_1: { | 3635 | if (blk_1: { |
| ... | @@ -2834,6 +3679,10 @@ const Parser = struct { | ... | @@ -2834,6 +3679,10 @@ const Parser = struct { |
| 2834 | }; | 3679 | }; |
| 2835 | } | 3680 | } |
| 2836 | pub fn parseline_string(p: *Parser) Error!bool { | 3681 | pub fn parseline_string(p: *Parser) Error!bool { |
| | 3682 | const def_index = @intFromEnum(Def.defline_string); |
| | 3683 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 3684 | p.depths[def_index] += 1; |
| | 3685 | defer p.depths[def_index] -= 1; |
| 2837 | return blk_0: { | 3686 | return blk_0: { |
| 2838 | const pos_0 = p.i; | 3687 | const pos_0 = p.i; |
| 2839 | if (blk_1: { | 3688 | if (blk_1: { |
| ... | @@ -2855,6 +3704,10 @@ const Parser = struct { | ... | @@ -2855,6 +3704,10 @@ const Parser = struct { |
| 2855 | }; | 3704 | }; |
| 2856 | } | 3705 | } |
| 2857 | pub fn parsenewline(p: *Parser) Error!bool { | 3706 | pub fn parsenewline(p: *Parser) Error!bool { |
| | 3707 | const def_index = @intFromEnum(Def.defnewline); |
| | 3708 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 3709 | p.depths[def_index] += 1; |
| | 3710 | defer p.depths[def_index] -= 1; |
| 2858 | return blk_0: { | 3711 | return blk_0: { |
| 2859 | const pos_0 = p.i; | 3712 | const pos_0 = p.i; |
| 2860 | if (blk_1: { | 3713 | if (blk_1: { |
| ... | @@ -2889,6 +3742,10 @@ const Parser = struct { | ... | @@ -2889,6 +3742,10 @@ const Parser = struct { |
| 2889 | }; | 3742 | }; |
| 2890 | } | 3743 | } |
| 2891 | pub fn parseskip(p: *Parser) Error!bool { | 3744 | pub fn parseskip(p: *Parser) Error!bool { |
| | 3745 | const def_index = @intFromEnum(Def.defskip); |
| | 3746 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 3747 | p.depths[def_index] += 1; |
| | 3748 | defer p.depths[def_index] -= 1; |
| 2892 | return blk_0: { | 3749 | return blk_0: { |
| 2893 | const pos_0 = p.i; | 3750 | const pos_0 = p.i; |
| 2894 | if ((try p.parsesof() or true) and blk_1: { | 3751 | if ((try p.parsesof() or true) and blk_1: { |
| ... | @@ -2921,6 +3778,10 @@ const Parser = struct { | ... | @@ -2921,6 +3778,10 @@ const Parser = struct { |
| 2921 | }; | 3778 | }; |
| 2922 | } | 3779 | } |
| 2923 | pub fn parseskip_require_newline(p: *Parser) Error!bool { | 3780 | pub fn parseskip_require_newline(p: *Parser) Error!bool { |
| | 3781 | const def_index = @intFromEnum(Def.defskip_require_newline); |
| | 3782 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 3783 | p.depths[def_index] += 1; |
| | 3784 | defer p.depths[def_index] -= 1; |
| 2924 | return blk_0: { | 3785 | return blk_0: { |
| 2925 | const pos_0 = p.i; | 3786 | const pos_0 = p.i; |
| 2926 | if (blk_1: { | 3787 | if (blk_1: { |
| ... | @@ -2959,6 +3820,10 @@ const Parser = struct { | ... | @@ -2959,6 +3820,10 @@ const Parser = struct { |
| 2959 | }; | 3820 | }; |
| 2960 | } | 3821 | } |
| 2961 | pub fn parsepre_op_white(p: *Parser) Error!bool { | 3822 | pub fn parsepre_op_white(p: *Parser) Error!bool { |
| | 3823 | const def_index = @intFromEnum(Def.defpre_op_white); |
| | 3824 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 3825 | p.depths[def_index] += 1; |
| | 3826 | defer p.depths[def_index] -= 1; |
| 2962 | return blk_0: { | 3827 | return blk_0: { |
| 2963 | const pos_0 = p.i; | 3828 | const pos_0 = p.i; |
| 2964 | if (blk_1: { | 3829 | if (blk_1: { |
| ... | @@ -2993,6 +3858,10 @@ const Parser = struct { | ... | @@ -2993,6 +3858,10 @@ const Parser = struct { |
| 2993 | }; | 3858 | }; |
| 2994 | } | 3859 | } |
| 2995 | pub fn parsepost_op_white(p: *Parser) Error!bool { | 3860 | pub fn parsepost_op_white(p: *Parser) Error!bool { |
| | 3861 | const def_index = @intFromEnum(Def.defpost_op_white); |
| | 3862 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 3863 | p.depths[def_index] += 1; |
| | 3864 | defer p.depths[def_index] -= 1; |
| 2996 | return blk_0: { | 3865 | return blk_0: { |
| 2997 | const pos_0 = p.i; | 3866 | const pos_0 = p.i; |
| 2998 | if ((p.i < p.source.len and switch (p.source[p.i]) { | 3867 | if ((p.i < p.source.len and switch (p.source[p.i]) { |
| ... | @@ -3011,6 +3880,10 @@ const Parser = struct { | ... | @@ -3011,6 +3880,10 @@ const Parser = struct { |
| 3011 | }; | 3880 | }; |
| 3012 | } | 3881 | } |
| 3013 | pub fn parseCHAR_LITERAL(p: *Parser) Error!bool { | 3882 | pub fn parseCHAR_LITERAL(p: *Parser) Error!bool { |
| | 3883 | const def_index = @intFromEnum(Def.defCHAR_LITERAL); |
| | 3884 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 3885 | p.depths[def_index] += 1; |
| | 3886 | defer p.depths[def_index] -= 1; |
| 3014 | return blk_0: { | 3887 | return blk_0: { |
| 3015 | const pos_0 = p.i; | 3888 | const pos_0 = p.i; |
| 3016 | if (try p.parseskip() and (p.i < p.source.len and switch (p.source[p.i]) { | 3889 | if (try p.parseskip() and (p.i < p.source.len and switch (p.source[p.i]) { |
| ... | @@ -3040,6 +3913,10 @@ const Parser = struct { | ... | @@ -3040,6 +3913,10 @@ const Parser = struct { |
| 3040 | }; | 3913 | }; |
| 3041 | } | 3914 | } |
| 3042 | pub fn parsedigit(p: *Parser) Error!bool { | 3915 | pub fn parsedigit(p: *Parser) Error!bool { |
| | 3916 | const def_index = @intFromEnum(Def.defdigit); |
| | 3917 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 3918 | p.depths[def_index] += 1; |
| | 3919 | defer p.depths[def_index] -= 1; |
| 3043 | return blk_0: { | 3920 | return blk_0: { |
| 3044 | const pos_0 = p.i; | 3921 | const pos_0 = p.i; |
| 3045 | if ((p.i < p.source.len and switch (p.source[p.i]) { | 3922 | if ((p.i < p.source.len and switch (p.source[p.i]) { |
| ... | @@ -3062,6 +3939,10 @@ const Parser = struct { | ... | @@ -3062,6 +3939,10 @@ const Parser = struct { |
| 3062 | }; | 3939 | }; |
| 3063 | } | 3940 | } |
| 3064 | pub fn parsedigit_int(p: *Parser) Error!bool { | 3941 | pub fn parsedigit_int(p: *Parser) Error!bool { |
| | 3942 | const def_index = @intFromEnum(Def.defdigit_int); |
| | 3943 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 3944 | p.depths[def_index] += 1; |
| | 3945 | defer p.depths[def_index] -= 1; |
| 3065 | return blk_0: { | 3946 | return blk_0: { |
| 3066 | const pos_0 = p.i; | 3947 | const pos_0 = p.i; |
| 3067 | if (try p.parsedigit()) break :blk_0 true; | 3948 | if (try p.parsedigit()) break :blk_0 true; |
| ... | @@ -3082,6 +3963,10 @@ const Parser = struct { | ... | @@ -3082,6 +3963,10 @@ const Parser = struct { |
| 3082 | }; | 3963 | }; |
| 3083 | } | 3964 | } |
| 3084 | pub fn parsedigit_float(p: *Parser) Error!bool { | 3965 | pub fn parsedigit_float(p: *Parser) Error!bool { |
| | 3966 | const def_index = @intFromEnum(Def.defdigit_float); |
| | 3967 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 3968 | p.depths[def_index] += 1; |
| | 3969 | defer p.depths[def_index] -= 1; |
| 3085 | return blk_0: { | 3970 | return blk_0: { |
| 3086 | const pos_0 = p.i; | 3971 | const pos_0 = p.i; |
| 3087 | if (try p.parsedigit()) break :blk_0 true; | 3972 | if (try p.parsedigit()) break :blk_0 true; |
| ... | @@ -3110,6 +3995,10 @@ const Parser = struct { | ... | @@ -3110,6 +3995,10 @@ const Parser = struct { |
| 3110 | }; | 3995 | }; |
| 3111 | } | 3996 | } |
| 3112 | pub fn parseNUMBERLITERAL(p: *Parser) Error!bool { | 3997 | pub fn parseNUMBERLITERAL(p: *Parser) Error!bool { |
| | 3998 | const def_index = @intFromEnum(Def.defNUMBERLITERAL); |
| | 3999 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 4000 | p.depths[def_index] += 1; |
| | 4001 | defer p.depths[def_index] -= 1; |
| 3113 | return blk_0: { | 4002 | return blk_0: { |
| 3114 | const pos_0 = p.i; | 4003 | const pos_0 = p.i; |
| 3115 | if (try p.parseskip() and (p.i < p.source.len and switch (p.source[p.i]) { | 4004 | if (try p.parseskip() and (p.i < p.source.len and switch (p.source[p.i]) { |
| ... | @@ -3163,6 +4052,10 @@ const Parser = struct { | ... | @@ -3163,6 +4052,10 @@ const Parser = struct { |
| 3163 | }; | 4052 | }; |
| 3164 | } | 4053 | } |
| 3165 | pub fn parsestring(p: *Parser) Error!bool { | 4054 | pub fn parsestring(p: *Parser) Error!bool { |
| | 4055 | const def_index = @intFromEnum(Def.defstring); |
| | 4056 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 4057 | p.depths[def_index] += 1; |
| | 4058 | defer p.depths[def_index] -= 1; |
| 3166 | return blk_0: { | 4059 | return blk_0: { |
| 3167 | const pos_0 = p.i; | 4060 | const pos_0 = p.i; |
| 3168 | if ((p.i < p.source.len and switch (p.source[p.i]) { | 4061 | if ((p.i < p.source.len and switch (p.source[p.i]) { |
| ... | @@ -3192,6 +4085,10 @@ const Parser = struct { | ... | @@ -3192,6 +4085,10 @@ const Parser = struct { |
| 3192 | }; | 4085 | }; |
| 3193 | } | 4086 | } |
| 3194 | pub fn parseSTRINGLITERALSINGLE(p: *Parser) Error!bool { | 4087 | pub fn parseSTRINGLITERALSINGLE(p: *Parser) Error!bool { |
| | 4088 | const def_index = @intFromEnum(Def.defSTRINGLITERALSINGLE); |
| | 4089 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 4090 | p.depths[def_index] += 1; |
| | 4091 | defer p.depths[def_index] -= 1; |
| 3195 | return blk_0: { | 4092 | return blk_0: { |
| 3196 | const pos_0 = p.i; | 4093 | const pos_0 = p.i; |
| 3197 | if (try p.parseskip() and try p.parsestring()) break :blk_0 true; | 4094 | if (try p.parseskip() and try p.parsestring()) break :blk_0 true; |
| ... | @@ -3200,6 +4097,10 @@ const Parser = struct { | ... | @@ -3200,6 +4097,10 @@ const Parser = struct { |
| 3200 | }; | 4097 | }; |
| 3201 | } | 4098 | } |
| 3202 | pub fn parseSTRINGLITERAL(p: *Parser) Error!bool { | 4099 | pub fn parseSTRINGLITERAL(p: *Parser) Error!bool { |
| | 4100 | const def_index = @intFromEnum(Def.defSTRINGLITERAL); |
| | 4101 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 4102 | p.depths[def_index] += 1; |
| | 4103 | defer p.depths[def_index] -= 1; |
| 3203 | return blk_0: { | 4104 | return blk_0: { |
| 3204 | const pos_0 = p.i; | 4105 | const pos_0 = p.i; |
| 3205 | if (try p.parseskip() and try p.parsestring()) break :blk_0 true; | 4106 | if (try p.parseskip() and try p.parsestring()) break :blk_0 true; |
| ... | @@ -3224,6 +4125,10 @@ const Parser = struct { | ... | @@ -3224,6 +4125,10 @@ const Parser = struct { |
| 3224 | }; | 4125 | }; |
| 3225 | } | 4126 | } |
| 3226 | pub fn parseIDENTIFIER(p: *Parser) Error!bool { | 4127 | pub fn parseIDENTIFIER(p: *Parser) Error!bool { |
| | 4128 | const def_index = @intFromEnum(Def.defIDENTIFIER); |
| | 4129 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 4130 | p.depths[def_index] += 1; |
| | 4131 | defer p.depths[def_index] -= 1; |
| 3227 | return blk_0: { | 4132 | return blk_0: { |
| 3228 | const pos_0 = p.i; | 4133 | const pos_0 = p.i; |
| 3229 | if (try p.parseskip() and blk_1: { | 4134 | if (try p.parseskip() and blk_1: { |
| ... | @@ -3271,6 +4176,10 @@ const Parser = struct { | ... | @@ -3271,6 +4176,10 @@ const Parser = struct { |
| 3271 | }; | 4176 | }; |
| 3272 | } | 4177 | } |
| 3273 | pub fn parseBUILTINIDENTIFIER(p: *Parser) Error!bool { | 4178 | pub fn parseBUILTINIDENTIFIER(p: *Parser) Error!bool { |
| | 4179 | const def_index = @intFromEnum(Def.defBUILTINIDENTIFIER); |
| | 4180 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 4181 | p.depths[def_index] += 1; |
| | 4182 | defer p.depths[def_index] -= 1; |
| 3274 | return blk_0: { | 4183 | return blk_0: { |
| 3275 | const pos_0 = p.i; | 4184 | const pos_0 = p.i; |
| 3276 | if (try p.parseskip() and blk_1: { | 4185 | if (try p.parseskip() and blk_1: { |
| ... | @@ -3311,6 +4220,10 @@ const Parser = struct { | ... | @@ -3311,6 +4220,10 @@ const Parser = struct { |
| 3311 | }; | 4220 | }; |
| 3312 | } | 4221 | } |
| 3313 | pub fn parseAMPERSAND(p: *Parser) Error!bool { | 4222 | pub fn parseAMPERSAND(p: *Parser) Error!bool { |
| | 4223 | const def_index = @intFromEnum(Def.defAMPERSAND); |
| | 4224 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 4225 | p.depths[def_index] += 1; |
| | 4226 | defer p.depths[def_index] -= 1; |
| 3314 | return blk_0: { | 4227 | return blk_0: { |
| 3315 | const pos_0 = p.i; | 4228 | const pos_0 = p.i; |
| 3316 | if (try p.parseskip() and blk_1: { | 4229 | if (try p.parseskip() and blk_1: { |
| ... | @@ -3337,6 +4250,10 @@ const Parser = struct { | ... | @@ -3337,6 +4250,10 @@ const Parser = struct { |
| 3337 | }; | 4250 | }; |
| 3338 | } | 4251 | } |
| 3339 | pub fn parseAMPERSANDEQUAL(p: *Parser) Error!bool { | 4252 | pub fn parseAMPERSANDEQUAL(p: *Parser) Error!bool { |
| | 4253 | const def_index = @intFromEnum(Def.defAMPERSANDEQUAL); |
| | 4254 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 4255 | p.depths[def_index] += 1; |
| | 4256 | defer p.depths[def_index] -= 1; |
| 3340 | return blk_0: { | 4257 | return blk_0: { |
| 3341 | const pos_0 = p.i; | 4258 | const pos_0 = p.i; |
| 3342 | if (try p.parseskip() and blk_1: { | 4259 | if (try p.parseskip() and blk_1: { |
| ... | @@ -3351,6 +4268,10 @@ const Parser = struct { | ... | @@ -3351,6 +4268,10 @@ const Parser = struct { |
| 3351 | }; | 4268 | }; |
| 3352 | } | 4269 | } |
| 3353 | pub fn parseASTERISK(p: *Parser) Error!bool { | 4270 | pub fn parseASTERISK(p: *Parser) Error!bool { |
| | 4271 | const def_index = @intFromEnum(Def.defASTERISK); |
| | 4272 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 4273 | p.depths[def_index] += 1; |
| | 4274 | defer p.depths[def_index] -= 1; |
| 3354 | return blk_0: { | 4275 | return blk_0: { |
| 3355 | const pos_0 = p.i; | 4276 | const pos_0 = p.i; |
| 3356 | if (try p.parseskip() and blk_1: { | 4277 | if (try p.parseskip() and blk_1: { |
| ... | @@ -3379,6 +4300,10 @@ const Parser = struct { | ... | @@ -3379,6 +4300,10 @@ const Parser = struct { |
| 3379 | }; | 4300 | }; |
| 3380 | } | 4301 | } |
| 3381 | pub fn parseASTERISKEQUAL(p: *Parser) Error!bool { | 4302 | pub fn parseASTERISKEQUAL(p: *Parser) Error!bool { |
| | 4303 | const def_index = @intFromEnum(Def.defASTERISKEQUAL); |
| | 4304 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 4305 | p.depths[def_index] += 1; |
| | 4306 | defer p.depths[def_index] -= 1; |
| 3382 | return blk_0: { | 4307 | return blk_0: { |
| 3383 | const pos_0 = p.i; | 4308 | const pos_0 = p.i; |
| 3384 | if (try p.parseskip() and blk_1: { | 4309 | if (try p.parseskip() and blk_1: { |
| ... | @@ -3393,6 +4318,10 @@ const Parser = struct { | ... | @@ -3393,6 +4318,10 @@ const Parser = struct { |
| 3393 | }; | 4318 | }; |
| 3394 | } | 4319 | } |
| 3395 | pub fn parseASTERISKPERCENT(p: *Parser) Error!bool { | 4320 | pub fn parseASTERISKPERCENT(p: *Parser) Error!bool { |
| | 4321 | const def_index = @intFromEnum(Def.defASTERISKPERCENT); |
| | 4322 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 4323 | p.depths[def_index] += 1; |
| | 4324 | defer p.depths[def_index] -= 1; |
| 3396 | return blk_0: { | 4325 | return blk_0: { |
| 3397 | const pos_0 = p.i; | 4326 | const pos_0 = p.i; |
| 3398 | if (try p.parseskip() and blk_1: { | 4327 | if (try p.parseskip() and blk_1: { |
| ... | @@ -3419,6 +4348,10 @@ const Parser = struct { | ... | @@ -3419,6 +4348,10 @@ const Parser = struct { |
| 3419 | }; | 4348 | }; |
| 3420 | } | 4349 | } |
| 3421 | pub fn parseASTERISKPERCENTEQUAL(p: *Parser) Error!bool { | 4350 | pub fn parseASTERISKPERCENTEQUAL(p: *Parser) Error!bool { |
| | 4351 | const def_index = @intFromEnum(Def.defASTERISKPERCENTEQUAL); |
| | 4352 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 4353 | p.depths[def_index] += 1; |
| | 4354 | defer p.depths[def_index] -= 1; |
| 3422 | return blk_0: { | 4355 | return blk_0: { |
| 3423 | const pos_0 = p.i; | 4356 | const pos_0 = p.i; |
| 3424 | if (try p.parseskip() and blk_1: { | 4357 | if (try p.parseskip() and blk_1: { |
| ... | @@ -3433,6 +4366,10 @@ const Parser = struct { | ... | @@ -3433,6 +4366,10 @@ const Parser = struct { |
| 3433 | }; | 4366 | }; |
| 3434 | } | 4367 | } |
| 3435 | pub fn parseASTERISKPIPE(p: *Parser) Error!bool { | 4368 | pub fn parseASTERISKPIPE(p: *Parser) Error!bool { |
| | 4369 | const def_index = @intFromEnum(Def.defASTERISKPIPE); |
| | 4370 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 4371 | p.depths[def_index] += 1; |
| | 4372 | defer p.depths[def_index] -= 1; |
| 3436 | return blk_0: { | 4373 | return blk_0: { |
| 3437 | const pos_0 = p.i; | 4374 | const pos_0 = p.i; |
| 3438 | if (try p.parseskip() and blk_1: { | 4375 | if (try p.parseskip() and blk_1: { |
| ... | @@ -3459,6 +4396,10 @@ const Parser = struct { | ... | @@ -3459,6 +4396,10 @@ const Parser = struct { |
| 3459 | }; | 4396 | }; |
| 3460 | } | 4397 | } |
| 3461 | pub fn parseASTERISKPIPEEQUAL(p: *Parser) Error!bool { | 4398 | pub fn parseASTERISKPIPEEQUAL(p: *Parser) Error!bool { |
| | 4399 | const def_index = @intFromEnum(Def.defASTERISKPIPEEQUAL); |
| | 4400 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 4401 | p.depths[def_index] += 1; |
| | 4402 | defer p.depths[def_index] -= 1; |
| 3462 | return blk_0: { | 4403 | return blk_0: { |
| 3463 | const pos_0 = p.i; | 4404 | const pos_0 = p.i; |
| 3464 | if (try p.parseskip() and blk_1: { | 4405 | if (try p.parseskip() and blk_1: { |
| ... | @@ -3473,6 +4414,10 @@ const Parser = struct { | ... | @@ -3473,6 +4414,10 @@ const Parser = struct { |
| 3473 | }; | 4414 | }; |
| 3474 | } | 4415 | } |
| 3475 | pub fn parseCARET(p: *Parser) Error!bool { | 4416 | pub fn parseCARET(p: *Parser) Error!bool { |
| | 4417 | const def_index = @intFromEnum(Def.defCARET); |
| | 4418 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 4419 | p.depths[def_index] += 1; |
| | 4420 | defer p.depths[def_index] -= 1; |
| 3476 | return blk_0: { | 4421 | return blk_0: { |
| 3477 | const pos_0 = p.i; | 4422 | const pos_0 = p.i; |
| 3478 | if (try p.parseskip() and blk_1: { | 4423 | if (try p.parseskip() and blk_1: { |
| ... | @@ -3499,6 +4444,10 @@ const Parser = struct { | ... | @@ -3499,6 +4444,10 @@ const Parser = struct { |
| 3499 | }; | 4444 | }; |
| 3500 | } | 4445 | } |
| 3501 | pub fn parseCARETEQUAL(p: *Parser) Error!bool { | 4446 | pub fn parseCARETEQUAL(p: *Parser) Error!bool { |
| | 4447 | const def_index = @intFromEnum(Def.defCARETEQUAL); |
| | 4448 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 4449 | p.depths[def_index] += 1; |
| | 4450 | defer p.depths[def_index] -= 1; |
| 3502 | return blk_0: { | 4451 | return blk_0: { |
| 3503 | const pos_0 = p.i; | 4452 | const pos_0 = p.i; |
| 3504 | if (try p.parseskip() and blk_1: { | 4453 | if (try p.parseskip() and blk_1: { |
| ... | @@ -3513,6 +4462,10 @@ const Parser = struct { | ... | @@ -3513,6 +4462,10 @@ const Parser = struct { |
| 3513 | }; | 4462 | }; |
| 3514 | } | 4463 | } |
| 3515 | pub fn parseCOLON(p: *Parser) Error!bool { | 4464 | pub fn parseCOLON(p: *Parser) Error!bool { |
| | 4465 | const def_index = @intFromEnum(Def.defCOLON); |
| | 4466 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 4467 | p.depths[def_index] += 1; |
| | 4468 | defer p.depths[def_index] -= 1; |
| 3516 | return blk_0: { | 4469 | return blk_0: { |
| 3517 | const pos_0 = p.i; | 4470 | const pos_0 = p.i; |
| 3518 | if (try p.parseskip() and blk_1: { | 4471 | if (try p.parseskip() and blk_1: { |
| ... | @@ -3527,6 +4480,10 @@ const Parser = struct { | ... | @@ -3527,6 +4480,10 @@ const Parser = struct { |
| 3527 | }; | 4480 | }; |
| 3528 | } | 4481 | } |
| 3529 | pub fn parseCOMMA(p: *Parser) Error!bool { | 4482 | pub fn parseCOMMA(p: *Parser) Error!bool { |
| | 4483 | const def_index = @intFromEnum(Def.defCOMMA); |
| | 4484 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 4485 | p.depths[def_index] += 1; |
| | 4486 | defer p.depths[def_index] -= 1; |
| 3530 | return blk_0: { | 4487 | return blk_0: { |
| 3531 | const pos_0 = p.i; | 4488 | const pos_0 = p.i; |
| 3532 | if (try p.parseskip() and blk_1: { | 4489 | if (try p.parseskip() and blk_1: { |
| ... | @@ -3541,6 +4498,10 @@ const Parser = struct { | ... | @@ -3541,6 +4498,10 @@ const Parser = struct { |
| 3541 | }; | 4498 | }; |
| 3542 | } | 4499 | } |
| 3543 | pub fn parseDOT(p: *Parser) Error!bool { | 4500 | pub fn parseDOT(p: *Parser) Error!bool { |
| | 4501 | const def_index = @intFromEnum(Def.defDOT); |
| | 4502 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 4503 | p.depths[def_index] += 1; |
| | 4504 | defer p.depths[def_index] -= 1; |
| 3544 | return blk_0: { | 4505 | return blk_0: { |
| 3545 | const pos_0 = p.i; | 4506 | const pos_0 = p.i; |
| 3546 | if (try p.parseskip() and blk_1: { | 4507 | if (try p.parseskip() and blk_1: { |
| ... | @@ -3568,6 +4529,10 @@ const Parser = struct { | ... | @@ -3568,6 +4529,10 @@ const Parser = struct { |
| 3568 | }; | 4529 | }; |
| 3569 | } | 4530 | } |
| 3570 | pub fn parseDOT2(p: *Parser) Error!bool { | 4531 | pub fn parseDOT2(p: *Parser) Error!bool { |
| | 4532 | const def_index = @intFromEnum(Def.defDOT2); |
| | 4533 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 4534 | p.depths[def_index] += 1; |
| | 4535 | defer p.depths[def_index] -= 1; |
| 3571 | return blk_0: { | 4536 | return blk_0: { |
| 3572 | const pos_0 = p.i; | 4537 | const pos_0 = p.i; |
| 3573 | if (try p.parseskip() and blk_1: { | 4538 | if (try p.parseskip() and blk_1: { |
| ... | @@ -3594,6 +4559,10 @@ const Parser = struct { | ... | @@ -3594,6 +4559,10 @@ const Parser = struct { |
| 3594 | }; | 4559 | }; |
| 3595 | } | 4560 | } |
| 3596 | pub fn parseDOT3(p: *Parser) Error!bool { | 4561 | pub fn parseDOT3(p: *Parser) Error!bool { |
| | 4562 | const def_index = @intFromEnum(Def.defDOT3); |
| | 4563 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 4564 | p.depths[def_index] += 1; |
| | 4565 | defer p.depths[def_index] -= 1; |
| 3597 | return blk_0: { | 4566 | return blk_0: { |
| 3598 | const pos_0 = p.i; | 4567 | const pos_0 = p.i; |
| 3599 | if (try p.parseskip() and blk_1: { | 4568 | if (try p.parseskip() and blk_1: { |
| ... | @@ -3608,6 +4577,10 @@ const Parser = struct { | ... | @@ -3608,6 +4577,10 @@ const Parser = struct { |
| 3608 | }; | 4577 | }; |
| 3609 | } | 4578 | } |
| 3610 | pub fn parseDOTASTERISK(p: *Parser) Error!bool { | 4579 | pub fn parseDOTASTERISK(p: *Parser) Error!bool { |
| | 4580 | const def_index = @intFromEnum(Def.defDOTASTERISK); |
| | 4581 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 4582 | p.depths[def_index] += 1; |
| | 4583 | defer p.depths[def_index] -= 1; |
| 3611 | return blk_0: { | 4584 | return blk_0: { |
| 3612 | const pos_0 = p.i; | 4585 | const pos_0 = p.i; |
| 3613 | if (try p.parseskip() and blk_1: { | 4586 | if (try p.parseskip() and blk_1: { |
| ... | @@ -3622,6 +4595,10 @@ const Parser = struct { | ... | @@ -3622,6 +4595,10 @@ const Parser = struct { |
| 3622 | }; | 4595 | }; |
| 3623 | } | 4596 | } |
| 3624 | pub fn parseEQUAL(p: *Parser) Error!bool { | 4597 | pub fn parseEQUAL(p: *Parser) Error!bool { |
| | 4598 | const def_index = @intFromEnum(Def.defEQUAL); |
| | 4599 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 4600 | p.depths[def_index] += 1; |
| | 4601 | defer p.depths[def_index] -= 1; |
| 3625 | return blk_0: { | 4602 | return blk_0: { |
| 3626 | const pos_0 = p.i; | 4603 | const pos_0 = p.i; |
| 3627 | if (try p.parseskip() and blk_1: { | 4604 | if (try p.parseskip() and blk_1: { |
| ... | @@ -3649,6 +4626,10 @@ const Parser = struct { | ... | @@ -3649,6 +4626,10 @@ const Parser = struct { |
| 3649 | }; | 4626 | }; |
| 3650 | } | 4627 | } |
| 3651 | pub fn parseEQUALEQUAL(p: *Parser) Error!bool { | 4628 | pub fn parseEQUALEQUAL(p: *Parser) Error!bool { |
| | 4629 | const def_index = @intFromEnum(Def.defEQUALEQUAL); |
| | 4630 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 4631 | p.depths[def_index] += 1; |
| | 4632 | defer p.depths[def_index] -= 1; |
| 3652 | return blk_0: { | 4633 | return blk_0: { |
| 3653 | const pos_0 = p.i; | 4634 | const pos_0 = p.i; |
| 3654 | if (try p.parseskip() and blk_1: { | 4635 | if (try p.parseskip() and blk_1: { |
| ... | @@ -3663,6 +4644,10 @@ const Parser = struct { | ... | @@ -3663,6 +4644,10 @@ const Parser = struct { |
| 3663 | }; | 4644 | }; |
| 3664 | } | 4645 | } |
| 3665 | pub fn parseEQUALRARROW(p: *Parser) Error!bool { | 4646 | pub fn parseEQUALRARROW(p: *Parser) Error!bool { |
| | 4647 | const def_index = @intFromEnum(Def.defEQUALRARROW); |
| | 4648 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 4649 | p.depths[def_index] += 1; |
| | 4650 | defer p.depths[def_index] -= 1; |
| 3666 | return blk_0: { | 4651 | return blk_0: { |
| 3667 | const pos_0 = p.i; | 4652 | const pos_0 = p.i; |
| 3668 | if (try p.parseskip() and blk_1: { | 4653 | if (try p.parseskip() and blk_1: { |
| ... | @@ -3677,6 +4662,10 @@ const Parser = struct { | ... | @@ -3677,6 +4662,10 @@ const Parser = struct { |
| 3677 | }; | 4662 | }; |
| 3678 | } | 4663 | } |
| 3679 | pub fn parseEXCLAMATIONMARK(p: *Parser) Error!bool { | 4664 | pub fn parseEXCLAMATIONMARK(p: *Parser) Error!bool { |
| | 4665 | const def_index = @intFromEnum(Def.defEXCLAMATIONMARK); |
| | 4666 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 4667 | p.depths[def_index] += 1; |
| | 4668 | defer p.depths[def_index] -= 1; |
| 3680 | return blk_0: { | 4669 | return blk_0: { |
| 3681 | const pos_0 = p.i; | 4670 | const pos_0 = p.i; |
| 3682 | if (try p.parseskip() and blk_1: { | 4671 | if (try p.parseskip() and blk_1: { |
| ... | @@ -3703,6 +4692,10 @@ const Parser = struct { | ... | @@ -3703,6 +4692,10 @@ const Parser = struct { |
| 3703 | }; | 4692 | }; |
| 3704 | } | 4693 | } |
| 3705 | pub fn parseEXCLAMATIONMARKEQUAL(p: *Parser) Error!bool { | 4694 | pub fn parseEXCLAMATIONMARKEQUAL(p: *Parser) Error!bool { |
| | 4695 | const def_index = @intFromEnum(Def.defEXCLAMATIONMARKEQUAL); |
| | 4696 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 4697 | p.depths[def_index] += 1; |
| | 4698 | defer p.depths[def_index] -= 1; |
| 3706 | return blk_0: { | 4699 | return blk_0: { |
| 3707 | const pos_0 = p.i; | 4700 | const pos_0 = p.i; |
| 3708 | if (try p.parseskip() and blk_1: { | 4701 | if (try p.parseskip() and blk_1: { |
| ... | @@ -3717,6 +4710,10 @@ const Parser = struct { | ... | @@ -3717,6 +4710,10 @@ const Parser = struct { |
| 3717 | }; | 4710 | }; |
| 3718 | } | 4711 | } |
| 3719 | pub fn parseLARROW(p: *Parser) Error!bool { | 4712 | pub fn parseLARROW(p: *Parser) Error!bool { |
| | 4713 | const def_index = @intFromEnum(Def.defLARROW); |
| | 4714 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 4715 | p.depths[def_index] += 1; |
| | 4716 | defer p.depths[def_index] -= 1; |
| 3720 | return blk_0: { | 4717 | return blk_0: { |
| 3721 | const pos_0 = p.i; | 4718 | const pos_0 = p.i; |
| 3722 | if (try p.parseskip() and blk_1: { | 4719 | if (try p.parseskip() and blk_1: { |
| ... | @@ -3744,6 +4741,10 @@ const Parser = struct { | ... | @@ -3744,6 +4741,10 @@ const Parser = struct { |
| 3744 | }; | 4741 | }; |
| 3745 | } | 4742 | } |
| 3746 | pub fn parseLARROW2(p: *Parser) Error!bool { | 4743 | pub fn parseLARROW2(p: *Parser) Error!bool { |
| | 4744 | const def_index = @intFromEnum(Def.defLARROW2); |
| | 4745 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 4746 | p.depths[def_index] += 1; |
| | 4747 | defer p.depths[def_index] -= 1; |
| 3747 | return blk_0: { | 4748 | return blk_0: { |
| 3748 | const pos_0 = p.i; | 4749 | const pos_0 = p.i; |
| 3749 | if (try p.parseskip() and blk_1: { | 4750 | if (try p.parseskip() and blk_1: { |
| ... | @@ -3771,6 +4772,10 @@ const Parser = struct { | ... | @@ -3771,6 +4772,10 @@ const Parser = struct { |
| 3771 | }; | 4772 | }; |
| 3772 | } | 4773 | } |
| 3773 | pub fn parseLARROW2EQUAL(p: *Parser) Error!bool { | 4774 | pub fn parseLARROW2EQUAL(p: *Parser) Error!bool { |
| | 4775 | const def_index = @intFromEnum(Def.defLARROW2EQUAL); |
| | 4776 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 4777 | p.depths[def_index] += 1; |
| | 4778 | defer p.depths[def_index] -= 1; |
| 3774 | return blk_0: { | 4779 | return blk_0: { |
| 3775 | const pos_0 = p.i; | 4780 | const pos_0 = p.i; |
| 3776 | if (try p.parseskip() and blk_1: { | 4781 | if (try p.parseskip() and blk_1: { |
| ... | @@ -3785,6 +4790,10 @@ const Parser = struct { | ... | @@ -3785,6 +4790,10 @@ const Parser = struct { |
| 3785 | }; | 4790 | }; |
| 3786 | } | 4791 | } |
| 3787 | pub fn parseLARROW2PIPE(p: *Parser) Error!bool { | 4792 | pub fn parseLARROW2PIPE(p: *Parser) Error!bool { |
| | 4793 | const def_index = @intFromEnum(Def.defLARROW2PIPE); |
| | 4794 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 4795 | p.depths[def_index] += 1; |
| | 4796 | defer p.depths[def_index] -= 1; |
| 3788 | return blk_0: { | 4797 | return blk_0: { |
| 3789 | const pos_0 = p.i; | 4798 | const pos_0 = p.i; |
| 3790 | if (try p.parseskip() and blk_1: { | 4799 | if (try p.parseskip() and blk_1: { |
| ... | @@ -3811,6 +4820,10 @@ const Parser = struct { | ... | @@ -3811,6 +4820,10 @@ const Parser = struct { |
| 3811 | }; | 4820 | }; |
| 3812 | } | 4821 | } |
| 3813 | pub fn parseLARROW2PIPEEQUAL(p: *Parser) Error!bool { | 4822 | pub fn parseLARROW2PIPEEQUAL(p: *Parser) Error!bool { |
| | 4823 | const def_index = @intFromEnum(Def.defLARROW2PIPEEQUAL); |
| | 4824 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 4825 | p.depths[def_index] += 1; |
| | 4826 | defer p.depths[def_index] -= 1; |
| 3814 | return blk_0: { | 4827 | return blk_0: { |
| 3815 | const pos_0 = p.i; | 4828 | const pos_0 = p.i; |
| 3816 | if (try p.parseskip() and blk_1: { | 4829 | if (try p.parseskip() and blk_1: { |
| ... | @@ -3825,6 +4838,10 @@ const Parser = struct { | ... | @@ -3825,6 +4838,10 @@ const Parser = struct { |
| 3825 | }; | 4838 | }; |
| 3826 | } | 4839 | } |
| 3827 | pub fn parseLARROWEQUAL(p: *Parser) Error!bool { | 4840 | pub fn parseLARROWEQUAL(p: *Parser) Error!bool { |
| | 4841 | const def_index = @intFromEnum(Def.defLARROWEQUAL); |
| | 4842 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 4843 | p.depths[def_index] += 1; |
| | 4844 | defer p.depths[def_index] -= 1; |
| 3828 | return blk_0: { | 4845 | return blk_0: { |
| 3829 | const pos_0 = p.i; | 4846 | const pos_0 = p.i; |
| 3830 | if (try p.parseskip() and blk_1: { | 4847 | if (try p.parseskip() and blk_1: { |
| ... | @@ -3839,6 +4856,10 @@ const Parser = struct { | ... | @@ -3839,6 +4856,10 @@ const Parser = struct { |
| 3839 | }; | 4856 | }; |
| 3840 | } | 4857 | } |
| 3841 | pub fn parseLBRACE(p: *Parser) Error!bool { | 4858 | pub fn parseLBRACE(p: *Parser) Error!bool { |
| | 4859 | const def_index = @intFromEnum(Def.defLBRACE); |
| | 4860 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 4861 | p.depths[def_index] += 1; |
| | 4862 | defer p.depths[def_index] -= 1; |
| 3842 | return blk_0: { | 4863 | return blk_0: { |
| 3843 | const pos_0 = p.i; | 4864 | const pos_0 = p.i; |
| 3844 | if (try p.parseskip() and blk_1: { | 4865 | if (try p.parseskip() and blk_1: { |
| ... | @@ -3853,6 +4874,10 @@ const Parser = struct { | ... | @@ -3853,6 +4874,10 @@ const Parser = struct { |
| 3853 | }; | 4874 | }; |
| 3854 | } | 4875 | } |
| 3855 | pub fn parseLBRACKET(p: *Parser) Error!bool { | 4876 | pub fn parseLBRACKET(p: *Parser) Error!bool { |
| | 4877 | const def_index = @intFromEnum(Def.defLBRACKET); |
| | 4878 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 4879 | p.depths[def_index] += 1; |
| | 4880 | defer p.depths[def_index] -= 1; |
| 3856 | return blk_0: { | 4881 | return blk_0: { |
| 3857 | const pos_0 = p.i; | 4882 | const pos_0 = p.i; |
| 3858 | if (try p.parseskip() and blk_1: { | 4883 | if (try p.parseskip() and blk_1: { |
| ... | @@ -3867,6 +4892,10 @@ const Parser = struct { | ... | @@ -3867,6 +4892,10 @@ const Parser = struct { |
| 3867 | }; | 4892 | }; |
| 3868 | } | 4893 | } |
| 3869 | pub fn parseLPAREN(p: *Parser) Error!bool { | 4894 | pub fn parseLPAREN(p: *Parser) Error!bool { |
| | 4895 | const def_index = @intFromEnum(Def.defLPAREN); |
| | 4896 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 4897 | p.depths[def_index] += 1; |
| | 4898 | defer p.depths[def_index] -= 1; |
| 3870 | return blk_0: { | 4899 | return blk_0: { |
| 3871 | const pos_0 = p.i; | 4900 | const pos_0 = p.i; |
| 3872 | if (try p.parseskip() and blk_1: { | 4901 | if (try p.parseskip() and blk_1: { |
| ... | @@ -3881,6 +4910,10 @@ const Parser = struct { | ... | @@ -3881,6 +4910,10 @@ const Parser = struct { |
| 3881 | }; | 4910 | }; |
| 3882 | } | 4911 | } |
| 3883 | pub fn parseMINUS(p: *Parser) Error!bool { | 4912 | pub fn parseMINUS(p: *Parser) Error!bool { |
| | 4913 | const def_index = @intFromEnum(Def.defMINUS); |
| | 4914 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 4915 | p.depths[def_index] += 1; |
| | 4916 | defer p.depths[def_index] -= 1; |
| 3884 | return blk_0: { | 4917 | return blk_0: { |
| 3885 | const pos_0 = p.i; | 4918 | const pos_0 = p.i; |
| 3886 | if (try p.parseskip() and blk_1: { | 4919 | if (try p.parseskip() and blk_1: { |
| ... | @@ -3910,6 +4943,10 @@ const Parser = struct { | ... | @@ -3910,6 +4943,10 @@ const Parser = struct { |
| 3910 | }; | 4943 | }; |
| 3911 | } | 4944 | } |
| 3912 | pub fn parseMINUSEQUAL(p: *Parser) Error!bool { | 4945 | pub fn parseMINUSEQUAL(p: *Parser) Error!bool { |
| | 4946 | const def_index = @intFromEnum(Def.defMINUSEQUAL); |
| | 4947 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 4948 | p.depths[def_index] += 1; |
| | 4949 | defer p.depths[def_index] -= 1; |
| 3913 | return blk_0: { | 4950 | return blk_0: { |
| 3914 | const pos_0 = p.i; | 4951 | const pos_0 = p.i; |
| 3915 | if (try p.parseskip() and blk_1: { | 4952 | if (try p.parseskip() and blk_1: { |
| ... | @@ -3924,6 +4961,10 @@ const Parser = struct { | ... | @@ -3924,6 +4961,10 @@ const Parser = struct { |
| 3924 | }; | 4961 | }; |
| 3925 | } | 4962 | } |
| 3926 | pub fn parseMINUSPERCENT(p: *Parser) Error!bool { | 4963 | pub fn parseMINUSPERCENT(p: *Parser) Error!bool { |
| | 4964 | const def_index = @intFromEnum(Def.defMINUSPERCENT); |
| | 4965 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 4966 | p.depths[def_index] += 1; |
| | 4967 | defer p.depths[def_index] -= 1; |
| 3927 | return blk_0: { | 4968 | return blk_0: { |
| 3928 | const pos_0 = p.i; | 4969 | const pos_0 = p.i; |
| 3929 | if (try p.parseskip() and blk_1: { | 4970 | if (try p.parseskip() and blk_1: { |
| ... | @@ -3950,6 +4991,10 @@ const Parser = struct { | ... | @@ -3950,6 +4991,10 @@ const Parser = struct { |
| 3950 | }; | 4991 | }; |
| 3951 | } | 4992 | } |
| 3952 | pub fn parseMINUSPERCENTEQUAL(p: *Parser) Error!bool { | 4993 | pub fn parseMINUSPERCENTEQUAL(p: *Parser) Error!bool { |
| | 4994 | const def_index = @intFromEnum(Def.defMINUSPERCENTEQUAL); |
| | 4995 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 4996 | p.depths[def_index] += 1; |
| | 4997 | defer p.depths[def_index] -= 1; |
| 3953 | return blk_0: { | 4998 | return blk_0: { |
| 3954 | const pos_0 = p.i; | 4999 | const pos_0 = p.i; |
| 3955 | if (try p.parseskip() and blk_1: { | 5000 | if (try p.parseskip() and blk_1: { |
| ... | @@ -3964,6 +5009,10 @@ const Parser = struct { | ... | @@ -3964,6 +5009,10 @@ const Parser = struct { |
| 3964 | }; | 5009 | }; |
| 3965 | } | 5010 | } |
| 3966 | pub fn parseMINUSPIPE(p: *Parser) Error!bool { | 5011 | pub fn parseMINUSPIPE(p: *Parser) Error!bool { |
| | 5012 | const def_index = @intFromEnum(Def.defMINUSPIPE); |
| | 5013 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 5014 | p.depths[def_index] += 1; |
| | 5015 | defer p.depths[def_index] -= 1; |
| 3967 | return blk_0: { | 5016 | return blk_0: { |
| 3968 | const pos_0 = p.i; | 5017 | const pos_0 = p.i; |
| 3969 | if (try p.parseskip() and blk_1: { | 5018 | if (try p.parseskip() and blk_1: { |
| ... | @@ -3990,6 +5039,10 @@ const Parser = struct { | ... | @@ -3990,6 +5039,10 @@ const Parser = struct { |
| 3990 | }; | 5039 | }; |
| 3991 | } | 5040 | } |
| 3992 | pub fn parseMINUSPIPEEQUAL(p: *Parser) Error!bool { | 5041 | pub fn parseMINUSPIPEEQUAL(p: *Parser) Error!bool { |
| | 5042 | const def_index = @intFromEnum(Def.defMINUSPIPEEQUAL); |
| | 5043 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 5044 | p.depths[def_index] += 1; |
| | 5045 | defer p.depths[def_index] -= 1; |
| 3993 | return blk_0: { | 5046 | return blk_0: { |
| 3994 | const pos_0 = p.i; | 5047 | const pos_0 = p.i; |
| 3995 | if (try p.parseskip() and blk_1: { | 5048 | if (try p.parseskip() and blk_1: { |
| ... | @@ -4004,6 +5057,10 @@ const Parser = struct { | ... | @@ -4004,6 +5057,10 @@ const Parser = struct { |
| 4004 | }; | 5057 | }; |
| 4005 | } | 5058 | } |
| 4006 | pub fn parseMINUSRARROW(p: *Parser) Error!bool { | 5059 | pub fn parseMINUSRARROW(p: *Parser) Error!bool { |
| | 5060 | const def_index = @intFromEnum(Def.defMINUSRARROW); |
| | 5061 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 5062 | p.depths[def_index] += 1; |
| | 5063 | defer p.depths[def_index] -= 1; |
| 4007 | return blk_0: { | 5064 | return blk_0: { |
| 4008 | const pos_0 = p.i; | 5065 | const pos_0 = p.i; |
| 4009 | if (try p.parseskip() and blk_1: { | 5066 | if (try p.parseskip() and blk_1: { |
| ... | @@ -4018,6 +5075,10 @@ const Parser = struct { | ... | @@ -4018,6 +5075,10 @@ const Parser = struct { |
| 4018 | }; | 5075 | }; |
| 4019 | } | 5076 | } |
| 4020 | pub fn parsePERCENT(p: *Parser) Error!bool { | 5077 | pub fn parsePERCENT(p: *Parser) Error!bool { |
| | 5078 | const def_index = @intFromEnum(Def.defPERCENT); |
| | 5079 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 5080 | p.depths[def_index] += 1; |
| | 5081 | defer p.depths[def_index] -= 1; |
| 4021 | return blk_0: { | 5082 | return blk_0: { |
| 4022 | const pos_0 = p.i; | 5083 | const pos_0 = p.i; |
| 4023 | if (try p.parseskip() and blk_1: { | 5084 | if (try p.parseskip() and blk_1: { |
| ... | @@ -4044,6 +5105,10 @@ const Parser = struct { | ... | @@ -4044,6 +5105,10 @@ const Parser = struct { |
| 4044 | }; | 5105 | }; |
| 4045 | } | 5106 | } |
| 4046 | pub fn parsePERCENTEQUAL(p: *Parser) Error!bool { | 5107 | pub fn parsePERCENTEQUAL(p: *Parser) Error!bool { |
| | 5108 | const def_index = @intFromEnum(Def.defPERCENTEQUAL); |
| | 5109 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 5110 | p.depths[def_index] += 1; |
| | 5111 | defer p.depths[def_index] -= 1; |
| 4047 | return blk_0: { | 5112 | return blk_0: { |
| 4048 | const pos_0 = p.i; | 5113 | const pos_0 = p.i; |
| 4049 | if (try p.parseskip() and blk_1: { | 5114 | if (try p.parseskip() and blk_1: { |
| ... | @@ -4058,6 +5123,10 @@ const Parser = struct { | ... | @@ -4058,6 +5123,10 @@ const Parser = struct { |
| 4058 | }; | 5123 | }; |
| 4059 | } | 5124 | } |
| 4060 | pub fn parsePIPE(p: *Parser) Error!bool { | 5125 | pub fn parsePIPE(p: *Parser) Error!bool { |
| | 5126 | const def_index = @intFromEnum(Def.defPIPE); |
| | 5127 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 5128 | p.depths[def_index] += 1; |
| | 5129 | defer p.depths[def_index] -= 1; |
| 4061 | return blk_0: { | 5130 | return blk_0: { |
| 4062 | const pos_0 = p.i; | 5131 | const pos_0 = p.i; |
| 4063 | if (try p.parseskip() and blk_1: { | 5132 | if (try p.parseskip() and blk_1: { |
| ... | @@ -4085,6 +5154,10 @@ const Parser = struct { | ... | @@ -4085,6 +5154,10 @@ const Parser = struct { |
| 4085 | }; | 5154 | }; |
| 4086 | } | 5155 | } |
| 4087 | pub fn parsePIPE2(p: *Parser) Error!bool { | 5156 | pub fn parsePIPE2(p: *Parser) Error!bool { |
| | 5157 | const def_index = @intFromEnum(Def.defPIPE2); |
| | 5158 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 5159 | p.depths[def_index] += 1; |
| | 5160 | defer p.depths[def_index] -= 1; |
| 4088 | return blk_0: { | 5161 | return blk_0: { |
| 4089 | const pos_0 = p.i; | 5162 | const pos_0 = p.i; |
| 4090 | if (try p.parseskip() and blk_1: { | 5163 | if (try p.parseskip() and blk_1: { |
| ... | @@ -4099,6 +5172,10 @@ const Parser = struct { | ... | @@ -4099,6 +5172,10 @@ const Parser = struct { |
| 4099 | }; | 5172 | }; |
| 4100 | } | 5173 | } |
| 4101 | pub fn parsePIPEEQUAL(p: *Parser) Error!bool { | 5174 | pub fn parsePIPEEQUAL(p: *Parser) Error!bool { |
| | 5175 | const def_index = @intFromEnum(Def.defPIPEEQUAL); |
| | 5176 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 5177 | p.depths[def_index] += 1; |
| | 5178 | defer p.depths[def_index] -= 1; |
| 4102 | return blk_0: { | 5179 | return blk_0: { |
| 4103 | const pos_0 = p.i; | 5180 | const pos_0 = p.i; |
| 4104 | if (try p.parseskip() and blk_1: { | 5181 | if (try p.parseskip() and blk_1: { |
| ... | @@ -4113,6 +5190,10 @@ const Parser = struct { | ... | @@ -4113,6 +5190,10 @@ const Parser = struct { |
| 4113 | }; | 5190 | }; |
| 4114 | } | 5191 | } |
| 4115 | pub fn parsePLUS(p: *Parser) Error!bool { | 5192 | pub fn parsePLUS(p: *Parser) Error!bool { |
| | 5193 | const def_index = @intFromEnum(Def.defPLUS); |
| | 5194 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 5195 | p.depths[def_index] += 1; |
| | 5196 | defer p.depths[def_index] -= 1; |
| 4116 | return blk_0: { | 5197 | return blk_0: { |
| 4117 | const pos_0 = p.i; | 5198 | const pos_0 = p.i; |
| 4118 | if (try p.parseskip() and blk_1: { | 5199 | if (try p.parseskip() and blk_1: { |
| ... | @@ -4142,6 +5223,10 @@ const Parser = struct { | ... | @@ -4142,6 +5223,10 @@ const Parser = struct { |
| 4142 | }; | 5223 | }; |
| 4143 | } | 5224 | } |
| 4144 | pub fn parsePLUS2(p: *Parser) Error!bool { | 5225 | pub fn parsePLUS2(p: *Parser) Error!bool { |
| | 5226 | const def_index = @intFromEnum(Def.defPLUS2); |
| | 5227 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 5228 | p.depths[def_index] += 1; |
| | 5229 | defer p.depths[def_index] -= 1; |
| 4145 | return blk_0: { | 5230 | return blk_0: { |
| 4146 | const pos_0 = p.i; | 5231 | const pos_0 = p.i; |
| 4147 | if (try p.parseskip() and blk_1: { | 5232 | if (try p.parseskip() and blk_1: { |
| ... | @@ -4156,6 +5241,10 @@ const Parser = struct { | ... | @@ -4156,6 +5241,10 @@ const Parser = struct { |
| 4156 | }; | 5241 | }; |
| 4157 | } | 5242 | } |
| 4158 | pub fn parsePLUSEQUAL(p: *Parser) Error!bool { | 5243 | pub fn parsePLUSEQUAL(p: *Parser) Error!bool { |
| | 5244 | const def_index = @intFromEnum(Def.defPLUSEQUAL); |
| | 5245 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 5246 | p.depths[def_index] += 1; |
| | 5247 | defer p.depths[def_index] -= 1; |
| 4159 | return blk_0: { | 5248 | return blk_0: { |
| 4160 | const pos_0 = p.i; | 5249 | const pos_0 = p.i; |
| 4161 | if (try p.parseskip() and blk_1: { | 5250 | if (try p.parseskip() and blk_1: { |
| ... | @@ -4170,6 +5259,10 @@ const Parser = struct { | ... | @@ -4170,6 +5259,10 @@ const Parser = struct { |
| 4170 | }; | 5259 | }; |
| 4171 | } | 5260 | } |
| 4172 | pub fn parsePLUSPERCENT(p: *Parser) Error!bool { | 5261 | pub fn parsePLUSPERCENT(p: *Parser) Error!bool { |
| | 5262 | const def_index = @intFromEnum(Def.defPLUSPERCENT); |
| | 5263 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 5264 | p.depths[def_index] += 1; |
| | 5265 | defer p.depths[def_index] -= 1; |
| 4173 | return blk_0: { | 5266 | return blk_0: { |
| 4174 | const pos_0 = p.i; | 5267 | const pos_0 = p.i; |
| 4175 | if (try p.parseskip() and blk_1: { | 5268 | if (try p.parseskip() and blk_1: { |
| ... | @@ -4196,6 +5289,10 @@ const Parser = struct { | ... | @@ -4196,6 +5289,10 @@ const Parser = struct { |
| 4196 | }; | 5289 | }; |
| 4197 | } | 5290 | } |
| 4198 | pub fn parsePLUSPERCENTEQUAL(p: *Parser) Error!bool { | 5291 | pub fn parsePLUSPERCENTEQUAL(p: *Parser) Error!bool { |
| | 5292 | const def_index = @intFromEnum(Def.defPLUSPERCENTEQUAL); |
| | 5293 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 5294 | p.depths[def_index] += 1; |
| | 5295 | defer p.depths[def_index] -= 1; |
| 4199 | return blk_0: { | 5296 | return blk_0: { |
| 4200 | const pos_0 = p.i; | 5297 | const pos_0 = p.i; |
| 4201 | if (try p.parseskip() and blk_1: { | 5298 | if (try p.parseskip() and blk_1: { |
| ... | @@ -4210,6 +5307,10 @@ const Parser = struct { | ... | @@ -4210,6 +5307,10 @@ const Parser = struct { |
| 4210 | }; | 5307 | }; |
| 4211 | } | 5308 | } |
| 4212 | pub fn parsePLUSPIPE(p: *Parser) Error!bool { | 5309 | pub fn parsePLUSPIPE(p: *Parser) Error!bool { |
| | 5310 | const def_index = @intFromEnum(Def.defPLUSPIPE); |
| | 5311 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 5312 | p.depths[def_index] += 1; |
| | 5313 | defer p.depths[def_index] -= 1; |
| 4213 | return blk_0: { | 5314 | return blk_0: { |
| 4214 | const pos_0 = p.i; | 5315 | const pos_0 = p.i; |
| 4215 | if (try p.parseskip() and blk_1: { | 5316 | if (try p.parseskip() and blk_1: { |
| ... | @@ -4236,6 +5337,10 @@ const Parser = struct { | ... | @@ -4236,6 +5337,10 @@ const Parser = struct { |
| 4236 | }; | 5337 | }; |
| 4237 | } | 5338 | } |
| 4238 | pub fn parsePLUSPIPEEQUAL(p: *Parser) Error!bool { | 5339 | pub fn parsePLUSPIPEEQUAL(p: *Parser) Error!bool { |
| | 5340 | const def_index = @intFromEnum(Def.defPLUSPIPEEQUAL); |
| | 5341 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 5342 | p.depths[def_index] += 1; |
| | 5343 | defer p.depths[def_index] -= 1; |
| 4239 | return blk_0: { | 5344 | return blk_0: { |
| 4240 | const pos_0 = p.i; | 5345 | const pos_0 = p.i; |
| 4241 | if (try p.parseskip() and blk_1: { | 5346 | if (try p.parseskip() and blk_1: { |
| ... | @@ -4250,6 +5355,10 @@ const Parser = struct { | ... | @@ -4250,6 +5355,10 @@ const Parser = struct { |
| 4250 | }; | 5355 | }; |
| 4251 | } | 5356 | } |
| 4252 | pub fn parseLETTERC(p: *Parser) Error!bool { | 5357 | pub fn parseLETTERC(p: *Parser) Error!bool { |
| | 5358 | const def_index = @intFromEnum(Def.defLETTERC); |
| | 5359 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 5360 | p.depths[def_index] += 1; |
| | 5361 | defer p.depths[def_index] -= 1; |
| 4253 | return blk_0: { | 5362 | return blk_0: { |
| 4254 | const pos_0 = p.i; | 5363 | const pos_0 = p.i; |
| 4255 | if (try p.parseskip() and blk_1: { | 5364 | if (try p.parseskip() and blk_1: { |
| ... | @@ -4264,6 +5373,10 @@ const Parser = struct { | ... | @@ -4264,6 +5373,10 @@ const Parser = struct { |
| 4264 | }; | 5373 | }; |
| 4265 | } | 5374 | } |
| 4266 | pub fn parseQUESTIONMARK(p: *Parser) Error!bool { | 5375 | pub fn parseQUESTIONMARK(p: *Parser) Error!bool { |
| | 5376 | const def_index = @intFromEnum(Def.defQUESTIONMARK); |
| | 5377 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 5378 | p.depths[def_index] += 1; |
| | 5379 | defer p.depths[def_index] -= 1; |
| 4267 | return blk_0: { | 5380 | return blk_0: { |
| 4268 | const pos_0 = p.i; | 5381 | const pos_0 = p.i; |
| 4269 | if (try p.parseskip() and blk_1: { | 5382 | if (try p.parseskip() and blk_1: { |
| ... | @@ -4278,6 +5391,10 @@ const Parser = struct { | ... | @@ -4278,6 +5391,10 @@ const Parser = struct { |
| 4278 | }; | 5391 | }; |
| 4279 | } | 5392 | } |
| 4280 | pub fn parseRARROW(p: *Parser) Error!bool { | 5393 | pub fn parseRARROW(p: *Parser) Error!bool { |
| | 5394 | const def_index = @intFromEnum(Def.defRARROW); |
| | 5395 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 5396 | p.depths[def_index] += 1; |
| | 5397 | defer p.depths[def_index] -= 1; |
| 4281 | return blk_0: { | 5398 | return blk_0: { |
| 4282 | const pos_0 = p.i; | 5399 | const pos_0 = p.i; |
| 4283 | if (try p.parseskip() and blk_1: { | 5400 | if (try p.parseskip() and blk_1: { |
| ... | @@ -4305,6 +5422,10 @@ const Parser = struct { | ... | @@ -4305,6 +5422,10 @@ const Parser = struct { |
| 4305 | }; | 5422 | }; |
| 4306 | } | 5423 | } |
| 4307 | pub fn parseRARROW2(p: *Parser) Error!bool { | 5424 | pub fn parseRARROW2(p: *Parser) Error!bool { |
| | 5425 | const def_index = @intFromEnum(Def.defRARROW2); |
| | 5426 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 5427 | p.depths[def_index] += 1; |
| | 5428 | defer p.depths[def_index] -= 1; |
| 4308 | return blk_0: { | 5429 | return blk_0: { |
| 4309 | const pos_0 = p.i; | 5430 | const pos_0 = p.i; |
| 4310 | if (try p.parseskip() and blk_1: { | 5431 | if (try p.parseskip() and blk_1: { |
| ... | @@ -4331,6 +5452,10 @@ const Parser = struct { | ... | @@ -4331,6 +5452,10 @@ const Parser = struct { |
| 4331 | }; | 5452 | }; |
| 4332 | } | 5453 | } |
| 4333 | pub fn parseRARROW2EQUAL(p: *Parser) Error!bool { | 5454 | pub fn parseRARROW2EQUAL(p: *Parser) Error!bool { |
| | 5455 | const def_index = @intFromEnum(Def.defRARROW2EQUAL); |
| | 5456 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 5457 | p.depths[def_index] += 1; |
| | 5458 | defer p.depths[def_index] -= 1; |
| 4334 | return blk_0: { | 5459 | return blk_0: { |
| 4335 | const pos_0 = p.i; | 5460 | const pos_0 = p.i; |
| 4336 | if (try p.parseskip() and blk_1: { | 5461 | if (try p.parseskip() and blk_1: { |
| ... | @@ -4345,6 +5470,10 @@ const Parser = struct { | ... | @@ -4345,6 +5470,10 @@ const Parser = struct { |
| 4345 | }; | 5470 | }; |
| 4346 | } | 5471 | } |
| 4347 | pub fn parseRARROWEQUAL(p: *Parser) Error!bool { | 5472 | pub fn parseRARROWEQUAL(p: *Parser) Error!bool { |
| | 5473 | const def_index = @intFromEnum(Def.defRARROWEQUAL); |
| | 5474 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 5475 | p.depths[def_index] += 1; |
| | 5476 | defer p.depths[def_index] -= 1; |
| 4348 | return blk_0: { | 5477 | return blk_0: { |
| 4349 | const pos_0 = p.i; | 5478 | const pos_0 = p.i; |
| 4350 | if (try p.parseskip() and blk_1: { | 5479 | if (try p.parseskip() and blk_1: { |
| ... | @@ -4359,6 +5488,10 @@ const Parser = struct { | ... | @@ -4359,6 +5488,10 @@ const Parser = struct { |
| 4359 | }; | 5488 | }; |
| 4360 | } | 5489 | } |
| 4361 | pub fn parseRBRACE(p: *Parser) Error!bool { | 5490 | pub fn parseRBRACE(p: *Parser) Error!bool { |
| | 5491 | const def_index = @intFromEnum(Def.defRBRACE); |
| | 5492 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 5493 | p.depths[def_index] += 1; |
| | 5494 | defer p.depths[def_index] -= 1; |
| 4362 | return blk_0: { | 5495 | return blk_0: { |
| 4363 | const pos_0 = p.i; | 5496 | const pos_0 = p.i; |
| 4364 | if (try p.parseskip() and blk_1: { | 5497 | if (try p.parseskip() and blk_1: { |
| ... | @@ -4373,6 +5506,10 @@ const Parser = struct { | ... | @@ -4373,6 +5506,10 @@ const Parser = struct { |
| 4373 | }; | 5506 | }; |
| 4374 | } | 5507 | } |
| 4375 | pub fn parseRBRACKET(p: *Parser) Error!bool { | 5508 | pub fn parseRBRACKET(p: *Parser) Error!bool { |
| | 5509 | const def_index = @intFromEnum(Def.defRBRACKET); |
| | 5510 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 5511 | p.depths[def_index] += 1; |
| | 5512 | defer p.depths[def_index] -= 1; |
| 4376 | return blk_0: { | 5513 | return blk_0: { |
| 4377 | const pos_0 = p.i; | 5514 | const pos_0 = p.i; |
| 4378 | if (try p.parseskip() and blk_1: { | 5515 | if (try p.parseskip() and blk_1: { |
| ... | @@ -4387,6 +5524,10 @@ const Parser = struct { | ... | @@ -4387,6 +5524,10 @@ const Parser = struct { |
| 4387 | }; | 5524 | }; |
| 4388 | } | 5525 | } |
| 4389 | pub fn parseRPAREN(p: *Parser) Error!bool { | 5526 | pub fn parseRPAREN(p: *Parser) Error!bool { |
| | 5527 | const def_index = @intFromEnum(Def.defRPAREN); |
| | 5528 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 5529 | p.depths[def_index] += 1; |
| | 5530 | defer p.depths[def_index] -= 1; |
| 4390 | return blk_0: { | 5531 | return blk_0: { |
| 4391 | const pos_0 = p.i; | 5532 | const pos_0 = p.i; |
| 4392 | if (try p.parseskip() and blk_1: { | 5533 | if (try p.parseskip() and blk_1: { |
| ... | @@ -4401,6 +5542,10 @@ const Parser = struct { | ... | @@ -4401,6 +5542,10 @@ const Parser = struct { |
| 4401 | }; | 5542 | }; |
| 4402 | } | 5543 | } |
| 4403 | pub fn parseSEMICOLON(p: *Parser) Error!bool { | 5544 | pub fn parseSEMICOLON(p: *Parser) Error!bool { |
| | 5545 | const def_index = @intFromEnum(Def.defSEMICOLON); |
| | 5546 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 5547 | p.depths[def_index] += 1; |
| | 5548 | defer p.depths[def_index] -= 1; |
| 4404 | return blk_0: { | 5549 | return blk_0: { |
| 4405 | const pos_0 = p.i; | 5550 | const pos_0 = p.i; |
| 4406 | if (try p.parseskip() and blk_1: { | 5551 | if (try p.parseskip() and blk_1: { |
| ... | @@ -4415,6 +5560,10 @@ const Parser = struct { | ... | @@ -4415,6 +5560,10 @@ const Parser = struct { |
| 4415 | }; | 5560 | }; |
| 4416 | } | 5561 | } |
| 4417 | pub fn parseSLASH(p: *Parser) Error!bool { | 5562 | pub fn parseSLASH(p: *Parser) Error!bool { |
| | 5563 | const def_index = @intFromEnum(Def.defSLASH); |
| | 5564 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 5565 | p.depths[def_index] += 1; |
| | 5566 | defer p.depths[def_index] -= 1; |
| 4418 | return blk_0: { | 5567 | return blk_0: { |
| 4419 | const pos_0 = p.i; | 5568 | const pos_0 = p.i; |
| 4420 | if (try p.parseskip() and blk_1: { | 5569 | if (try p.parseskip() and blk_1: { |
| ... | @@ -4442,6 +5591,10 @@ const Parser = struct { | ... | @@ -4442,6 +5591,10 @@ const Parser = struct { |
| 4442 | }; | 5591 | }; |
| 4443 | } | 5592 | } |
| 4444 | pub fn parseSLASHEQUAL(p: *Parser) Error!bool { | 5593 | pub fn parseSLASHEQUAL(p: *Parser) Error!bool { |
| | 5594 | const def_index = @intFromEnum(Def.defSLASHEQUAL); |
| | 5595 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 5596 | p.depths[def_index] += 1; |
| | 5597 | defer p.depths[def_index] -= 1; |
| 4445 | return blk_0: { | 5598 | return blk_0: { |
| 4446 | const pos_0 = p.i; | 5599 | const pos_0 = p.i; |
| 4447 | if (try p.parseskip() and blk_1: { | 5600 | if (try p.parseskip() and blk_1: { |
| ... | @@ -4456,6 +5609,10 @@ const Parser = struct { | ... | @@ -4456,6 +5609,10 @@ const Parser = struct { |
| 4456 | }; | 5609 | }; |
| 4457 | } | 5610 | } |
| 4458 | pub fn parseTILDE(p: *Parser) Error!bool { | 5611 | pub fn parseTILDE(p: *Parser) Error!bool { |
| | 5612 | const def_index = @intFromEnum(Def.defTILDE); |
| | 5613 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 5614 | p.depths[def_index] += 1; |
| | 5615 | defer p.depths[def_index] -= 1; |
| 4459 | return blk_0: { | 5616 | return blk_0: { |
| 4460 | const pos_0 = p.i; | 5617 | const pos_0 = p.i; |
| 4461 | if (try p.parseskip() and blk_1: { | 5618 | if (try p.parseskip() and blk_1: { |
| ... | @@ -4470,6 +5627,10 @@ const Parser = struct { | ... | @@ -4470,6 +5627,10 @@ const Parser = struct { |
| 4470 | }; | 5627 | }; |
| 4471 | } | 5628 | } |
| 4472 | pub fn parseend_of_word(p: *Parser) Error!bool { | 5629 | pub fn parseend_of_word(p: *Parser) Error!bool { |
| | 5630 | const def_index = @intFromEnum(Def.defend_of_word); |
| | 5631 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 5632 | p.depths[def_index] += 1; |
| | 5633 | defer p.depths[def_index] -= 1; |
| 4473 | return blk_0: { | 5634 | return blk_0: { |
| 4474 | const pos_0 = p.i; | 5635 | const pos_0 = p.i; |
| 4475 | if (blk_1: { | 5636 | if (blk_1: { |
| ... | @@ -4493,6 +5654,10 @@ const Parser = struct { | ... | @@ -4493,6 +5654,10 @@ const Parser = struct { |
| 4493 | }; | 5654 | }; |
| 4494 | } | 5655 | } |
| 4495 | pub fn parseKEYWORD_addrspace(p: *Parser) Error!bool { | 5656 | pub fn parseKEYWORD_addrspace(p: *Parser) Error!bool { |
| | 5657 | const def_index = @intFromEnum(Def.defKEYWORD_addrspace); |
| | 5658 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 5659 | p.depths[def_index] += 1; |
| | 5660 | defer p.depths[def_index] -= 1; |
| 4496 | return blk_0: { | 5661 | return blk_0: { |
| 4497 | const pos_0 = p.i; | 5662 | const pos_0 = p.i; |
| 4498 | if (try p.parseskip() and blk_1: { | 5663 | if (try p.parseskip() and blk_1: { |
| ... | @@ -4507,6 +5672,10 @@ const Parser = struct { | ... | @@ -4507,6 +5672,10 @@ const Parser = struct { |
| 4507 | }; | 5672 | }; |
| 4508 | } | 5673 | } |
| 4509 | pub fn parseKEYWORD_align(p: *Parser) Error!bool { | 5674 | pub fn parseKEYWORD_align(p: *Parser) Error!bool { |
| | 5675 | const def_index = @intFromEnum(Def.defKEYWORD_align); |
| | 5676 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 5677 | p.depths[def_index] += 1; |
| | 5678 | defer p.depths[def_index] -= 1; |
| 4510 | return blk_0: { | 5679 | return blk_0: { |
| 4511 | const pos_0 = p.i; | 5680 | const pos_0 = p.i; |
| 4512 | if (try p.parseskip() and blk_1: { | 5681 | if (try p.parseskip() and blk_1: { |
| ... | @@ -4521,6 +5690,10 @@ const Parser = struct { | ... | @@ -4521,6 +5690,10 @@ const Parser = struct { |
| 4521 | }; | 5690 | }; |
| 4522 | } | 5691 | } |
| 4523 | pub fn parseKEYWORD_allowzero(p: *Parser) Error!bool { | 5692 | pub fn parseKEYWORD_allowzero(p: *Parser) Error!bool { |
| | 5693 | const def_index = @intFromEnum(Def.defKEYWORD_allowzero); |
| | 5694 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 5695 | p.depths[def_index] += 1; |
| | 5696 | defer p.depths[def_index] -= 1; |
| 4524 | return blk_0: { | 5697 | return blk_0: { |
| 4525 | const pos_0 = p.i; | 5698 | const pos_0 = p.i; |
| 4526 | if (try p.parseskip() and blk_1: { | 5699 | if (try p.parseskip() and blk_1: { |
| ... | @@ -4535,6 +5708,10 @@ const Parser = struct { | ... | @@ -4535,6 +5708,10 @@ const Parser = struct { |
| 4535 | }; | 5708 | }; |
| 4536 | } | 5709 | } |
| 4537 | pub fn parseKEYWORD_and(p: *Parser) Error!bool { | 5710 | pub fn parseKEYWORD_and(p: *Parser) Error!bool { |
| | 5711 | const def_index = @intFromEnum(Def.defKEYWORD_and); |
| | 5712 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 5713 | p.depths[def_index] += 1; |
| | 5714 | defer p.depths[def_index] -= 1; |
| 4538 | return blk_0: { | 5715 | return blk_0: { |
| 4539 | const pos_0 = p.i; | 5716 | const pos_0 = p.i; |
| 4540 | if (try p.parseskip() and blk_1: { | 5717 | if (try p.parseskip() and blk_1: { |
| ... | @@ -4549,6 +5726,10 @@ const Parser = struct { | ... | @@ -4549,6 +5726,10 @@ const Parser = struct { |
| 4549 | }; | 5726 | }; |
| 4550 | } | 5727 | } |
| 4551 | pub fn parseKEYWORD_anyframe(p: *Parser) Error!bool { | 5728 | pub fn parseKEYWORD_anyframe(p: *Parser) Error!bool { |
| | 5729 | const def_index = @intFromEnum(Def.defKEYWORD_anyframe); |
| | 5730 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 5731 | p.depths[def_index] += 1; |
| | 5732 | defer p.depths[def_index] -= 1; |
| 4552 | return blk_0: { | 5733 | return blk_0: { |
| 4553 | const pos_0 = p.i; | 5734 | const pos_0 = p.i; |
| 4554 | if (try p.parseskip() and blk_1: { | 5735 | if (try p.parseskip() and blk_1: { |
| ... | @@ -4563,6 +5744,10 @@ const Parser = struct { | ... | @@ -4563,6 +5744,10 @@ const Parser = struct { |
| 4563 | }; | 5744 | }; |
| 4564 | } | 5745 | } |
| 4565 | pub fn parseKEYWORD_anytype(p: *Parser) Error!bool { | 5746 | pub fn parseKEYWORD_anytype(p: *Parser) Error!bool { |
| | 5747 | const def_index = @intFromEnum(Def.defKEYWORD_anytype); |
| | 5748 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 5749 | p.depths[def_index] += 1; |
| | 5750 | defer p.depths[def_index] -= 1; |
| 4566 | return blk_0: { | 5751 | return blk_0: { |
| 4567 | const pos_0 = p.i; | 5752 | const pos_0 = p.i; |
| 4568 | if (try p.parseskip() and blk_1: { | 5753 | if (try p.parseskip() and blk_1: { |
| ... | @@ -4577,6 +5762,10 @@ const Parser = struct { | ... | @@ -4577,6 +5762,10 @@ const Parser = struct { |
| 4577 | }; | 5762 | }; |
| 4578 | } | 5763 | } |
| 4579 | pub fn parseKEYWORD_asm(p: *Parser) Error!bool { | 5764 | pub fn parseKEYWORD_asm(p: *Parser) Error!bool { |
| | 5765 | const def_index = @intFromEnum(Def.defKEYWORD_asm); |
| | 5766 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 5767 | p.depths[def_index] += 1; |
| | 5768 | defer p.depths[def_index] -= 1; |
| 4580 | return blk_0: { | 5769 | return blk_0: { |
| 4581 | const pos_0 = p.i; | 5770 | const pos_0 = p.i; |
| 4582 | if (try p.parseskip() and blk_1: { | 5771 | if (try p.parseskip() and blk_1: { |
| ... | @@ -4591,6 +5780,10 @@ const Parser = struct { | ... | @@ -4591,6 +5780,10 @@ const Parser = struct { |
| 4591 | }; | 5780 | }; |
| 4592 | } | 5781 | } |
| 4593 | pub fn parseKEYWORD_break(p: *Parser) Error!bool { | 5782 | pub fn parseKEYWORD_break(p: *Parser) Error!bool { |
| | 5783 | const def_index = @intFromEnum(Def.defKEYWORD_break); |
| | 5784 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 5785 | p.depths[def_index] += 1; |
| | 5786 | defer p.depths[def_index] -= 1; |
| 4594 | return blk_0: { | 5787 | return blk_0: { |
| 4595 | const pos_0 = p.i; | 5788 | const pos_0 = p.i; |
| 4596 | if (try p.parseskip() and blk_1: { | 5789 | if (try p.parseskip() and blk_1: { |
| ... | @@ -4605,6 +5798,10 @@ const Parser = struct { | ... | @@ -4605,6 +5798,10 @@ const Parser = struct { |
| 4605 | }; | 5798 | }; |
| 4606 | } | 5799 | } |
| 4607 | pub fn parseKEYWORD_callconv(p: *Parser) Error!bool { | 5800 | pub fn parseKEYWORD_callconv(p: *Parser) Error!bool { |
| | 5801 | const def_index = @intFromEnum(Def.defKEYWORD_callconv); |
| | 5802 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 5803 | p.depths[def_index] += 1; |
| | 5804 | defer p.depths[def_index] -= 1; |
| 4608 | return blk_0: { | 5805 | return blk_0: { |
| 4609 | const pos_0 = p.i; | 5806 | const pos_0 = p.i; |
| 4610 | if (try p.parseskip() and blk_1: { | 5807 | if (try p.parseskip() and blk_1: { |
| ... | @@ -4619,6 +5816,10 @@ const Parser = struct { | ... | @@ -4619,6 +5816,10 @@ const Parser = struct { |
| 4619 | }; | 5816 | }; |
| 4620 | } | 5817 | } |
| 4621 | pub fn parseKEYWORD_catch(p: *Parser) Error!bool { | 5818 | pub fn parseKEYWORD_catch(p: *Parser) Error!bool { |
| | 5819 | const def_index = @intFromEnum(Def.defKEYWORD_catch); |
| | 5820 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 5821 | p.depths[def_index] += 1; |
| | 5822 | defer p.depths[def_index] -= 1; |
| 4622 | return blk_0: { | 5823 | return blk_0: { |
| 4623 | const pos_0 = p.i; | 5824 | const pos_0 = p.i; |
| 4624 | if (try p.parseskip() and blk_1: { | 5825 | if (try p.parseskip() and blk_1: { |
| ... | @@ -4633,6 +5834,10 @@ const Parser = struct { | ... | @@ -4633,6 +5834,10 @@ const Parser = struct { |
| 4633 | }; | 5834 | }; |
| 4634 | } | 5835 | } |
| 4635 | pub fn parseKEYWORD_comptime(p: *Parser) Error!bool { | 5836 | pub fn parseKEYWORD_comptime(p: *Parser) Error!bool { |
| | 5837 | const def_index = @intFromEnum(Def.defKEYWORD_comptime); |
| | 5838 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 5839 | p.depths[def_index] += 1; |
| | 5840 | defer p.depths[def_index] -= 1; |
| 4636 | return blk_0: { | 5841 | return blk_0: { |
| 4637 | const pos_0 = p.i; | 5842 | const pos_0 = p.i; |
| 4638 | if (try p.parseskip() and blk_1: { | 5843 | if (try p.parseskip() and blk_1: { |
| ... | @@ -4647,6 +5852,10 @@ const Parser = struct { | ... | @@ -4647,6 +5852,10 @@ const Parser = struct { |
| 4647 | }; | 5852 | }; |
| 4648 | } | 5853 | } |
| 4649 | pub fn parseKEYWORD_const(p: *Parser) Error!bool { | 5854 | pub fn parseKEYWORD_const(p: *Parser) Error!bool { |
| | 5855 | const def_index = @intFromEnum(Def.defKEYWORD_const); |
| | 5856 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 5857 | p.depths[def_index] += 1; |
| | 5858 | defer p.depths[def_index] -= 1; |
| 4650 | return blk_0: { | 5859 | return blk_0: { |
| 4651 | const pos_0 = p.i; | 5860 | const pos_0 = p.i; |
| 4652 | if (try p.parseskip() and blk_1: { | 5861 | if (try p.parseskip() and blk_1: { |
| ... | @@ -4661,6 +5870,10 @@ const Parser = struct { | ... | @@ -4661,6 +5870,10 @@ const Parser = struct { |
| 4661 | }; | 5870 | }; |
| 4662 | } | 5871 | } |
| 4663 | pub fn parseKEYWORD_continue(p: *Parser) Error!bool { | 5872 | pub fn parseKEYWORD_continue(p: *Parser) Error!bool { |
| | 5873 | const def_index = @intFromEnum(Def.defKEYWORD_continue); |
| | 5874 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 5875 | p.depths[def_index] += 1; |
| | 5876 | defer p.depths[def_index] -= 1; |
| 4664 | return blk_0: { | 5877 | return blk_0: { |
| 4665 | const pos_0 = p.i; | 5878 | const pos_0 = p.i; |
| 4666 | if (try p.parseskip() and blk_1: { | 5879 | if (try p.parseskip() and blk_1: { |
| ... | @@ -4675,6 +5888,10 @@ const Parser = struct { | ... | @@ -4675,6 +5888,10 @@ const Parser = struct { |
| 4675 | }; | 5888 | }; |
| 4676 | } | 5889 | } |
| 4677 | pub fn parseKEYWORD_defer(p: *Parser) Error!bool { | 5890 | pub fn parseKEYWORD_defer(p: *Parser) Error!bool { |
| | 5891 | const def_index = @intFromEnum(Def.defKEYWORD_defer); |
| | 5892 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 5893 | p.depths[def_index] += 1; |
| | 5894 | defer p.depths[def_index] -= 1; |
| 4678 | return blk_0: { | 5895 | return blk_0: { |
| 4679 | const pos_0 = p.i; | 5896 | const pos_0 = p.i; |
| 4680 | if (try p.parseskip() and blk_1: { | 5897 | if (try p.parseskip() and blk_1: { |
| ... | @@ -4689,6 +5906,10 @@ const Parser = struct { | ... | @@ -4689,6 +5906,10 @@ const Parser = struct { |
| 4689 | }; | 5906 | }; |
| 4690 | } | 5907 | } |
| 4691 | pub fn parseKEYWORD_else(p: *Parser) Error!bool { | 5908 | pub fn parseKEYWORD_else(p: *Parser) Error!bool { |
| | 5909 | const def_index = @intFromEnum(Def.defKEYWORD_else); |
| | 5910 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 5911 | p.depths[def_index] += 1; |
| | 5912 | defer p.depths[def_index] -= 1; |
| 4692 | return blk_0: { | 5913 | return blk_0: { |
| 4693 | const pos_0 = p.i; | 5914 | const pos_0 = p.i; |
| 4694 | if (try p.parseskip() and blk_1: { | 5915 | if (try p.parseskip() and blk_1: { |
| ... | @@ -4703,6 +5924,10 @@ const Parser = struct { | ... | @@ -4703,6 +5924,10 @@ const Parser = struct { |
| 4703 | }; | 5924 | }; |
| 4704 | } | 5925 | } |
| 4705 | pub fn parseKEYWORD_enum(p: *Parser) Error!bool { | 5926 | pub fn parseKEYWORD_enum(p: *Parser) Error!bool { |
| | 5927 | const def_index = @intFromEnum(Def.defKEYWORD_enum); |
| | 5928 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 5929 | p.depths[def_index] += 1; |
| | 5930 | defer p.depths[def_index] -= 1; |
| 4706 | return blk_0: { | 5931 | return blk_0: { |
| 4707 | const pos_0 = p.i; | 5932 | const pos_0 = p.i; |
| 4708 | if (try p.parseskip() and blk_1: { | 5933 | if (try p.parseskip() and blk_1: { |
| ... | @@ -4717,6 +5942,10 @@ const Parser = struct { | ... | @@ -4717,6 +5942,10 @@ const Parser = struct { |
| 4717 | }; | 5942 | }; |
| 4718 | } | 5943 | } |
| 4719 | pub fn parseKEYWORD_errdefer(p: *Parser) Error!bool { | 5944 | pub fn parseKEYWORD_errdefer(p: *Parser) Error!bool { |
| | 5945 | const def_index = @intFromEnum(Def.defKEYWORD_errdefer); |
| | 5946 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 5947 | p.depths[def_index] += 1; |
| | 5948 | defer p.depths[def_index] -= 1; |
| 4720 | return blk_0: { | 5949 | return blk_0: { |
| 4721 | const pos_0 = p.i; | 5950 | const pos_0 = p.i; |
| 4722 | if (try p.parseskip() and blk_1: { | 5951 | if (try p.parseskip() and blk_1: { |
| ... | @@ -4731,6 +5960,10 @@ const Parser = struct { | ... | @@ -4731,6 +5960,10 @@ const Parser = struct { |
| 4731 | }; | 5960 | }; |
| 4732 | } | 5961 | } |
| 4733 | pub fn parseKEYWORD_error(p: *Parser) Error!bool { | 5962 | pub fn parseKEYWORD_error(p: *Parser) Error!bool { |
| | 5963 | const def_index = @intFromEnum(Def.defKEYWORD_error); |
| | 5964 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 5965 | p.depths[def_index] += 1; |
| | 5966 | defer p.depths[def_index] -= 1; |
| 4734 | return blk_0: { | 5967 | return blk_0: { |
| 4735 | const pos_0 = p.i; | 5968 | const pos_0 = p.i; |
| 4736 | if (try p.parseskip() and blk_1: { | 5969 | if (try p.parseskip() and blk_1: { |
| ... | @@ -4745,6 +5978,10 @@ const Parser = struct { | ... | @@ -4745,6 +5978,10 @@ const Parser = struct { |
| 4745 | }; | 5978 | }; |
| 4746 | } | 5979 | } |
| 4747 | pub fn parseKEYWORD_export(p: *Parser) Error!bool { | 5980 | pub fn parseKEYWORD_export(p: *Parser) Error!bool { |
| | 5981 | const def_index = @intFromEnum(Def.defKEYWORD_export); |
| | 5982 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 5983 | p.depths[def_index] += 1; |
| | 5984 | defer p.depths[def_index] -= 1; |
| 4748 | return blk_0: { | 5985 | return blk_0: { |
| 4749 | const pos_0 = p.i; | 5986 | const pos_0 = p.i; |
| 4750 | if (try p.parseskip() and blk_1: { | 5987 | if (try p.parseskip() and blk_1: { |
| ... | @@ -4759,6 +5996,10 @@ const Parser = struct { | ... | @@ -4759,6 +5996,10 @@ const Parser = struct { |
| 4759 | }; | 5996 | }; |
| 4760 | } | 5997 | } |
| 4761 | pub fn parseKEYWORD_extern(p: *Parser) Error!bool { | 5998 | pub fn parseKEYWORD_extern(p: *Parser) Error!bool { |
| | 5999 | const def_index = @intFromEnum(Def.defKEYWORD_extern); |
| | 6000 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 6001 | p.depths[def_index] += 1; |
| | 6002 | defer p.depths[def_index] -= 1; |
| 4762 | return blk_0: { | 6003 | return blk_0: { |
| 4763 | const pos_0 = p.i; | 6004 | const pos_0 = p.i; |
| 4764 | if (try p.parseskip() and blk_1: { | 6005 | if (try p.parseskip() and blk_1: { |
| ... | @@ -4773,6 +6014,10 @@ const Parser = struct { | ... | @@ -4773,6 +6014,10 @@ const Parser = struct { |
| 4773 | }; | 6014 | }; |
| 4774 | } | 6015 | } |
| 4775 | pub fn parseKEYWORD_fn(p: *Parser) Error!bool { | 6016 | pub fn parseKEYWORD_fn(p: *Parser) Error!bool { |
| | 6017 | const def_index = @intFromEnum(Def.defKEYWORD_fn); |
| | 6018 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 6019 | p.depths[def_index] += 1; |
| | 6020 | defer p.depths[def_index] -= 1; |
| 4776 | return blk_0: { | 6021 | return blk_0: { |
| 4777 | const pos_0 = p.i; | 6022 | const pos_0 = p.i; |
| 4778 | if (try p.parseskip() and blk_1: { | 6023 | if (try p.parseskip() and blk_1: { |
| ... | @@ -4787,6 +6032,10 @@ const Parser = struct { | ... | @@ -4787,6 +6032,10 @@ const Parser = struct { |
| 4787 | }; | 6032 | }; |
| 4788 | } | 6033 | } |
| 4789 | pub fn parseKEYWORD_for(p: *Parser) Error!bool { | 6034 | pub fn parseKEYWORD_for(p: *Parser) Error!bool { |
| | 6035 | const def_index = @intFromEnum(Def.defKEYWORD_for); |
| | 6036 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 6037 | p.depths[def_index] += 1; |
| | 6038 | defer p.depths[def_index] -= 1; |
| 4790 | return blk_0: { | 6039 | return blk_0: { |
| 4791 | const pos_0 = p.i; | 6040 | const pos_0 = p.i; |
| 4792 | if (try p.parseskip() and blk_1: { | 6041 | if (try p.parseskip() and blk_1: { |
| ... | @@ -4801,6 +6050,10 @@ const Parser = struct { | ... | @@ -4801,6 +6050,10 @@ const Parser = struct { |
| 4801 | }; | 6050 | }; |
| 4802 | } | 6051 | } |
| 4803 | pub fn parseKEYWORD_if(p: *Parser) Error!bool { | 6052 | pub fn parseKEYWORD_if(p: *Parser) Error!bool { |
| | 6053 | const def_index = @intFromEnum(Def.defKEYWORD_if); |
| | 6054 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 6055 | p.depths[def_index] += 1; |
| | 6056 | defer p.depths[def_index] -= 1; |
| 4804 | return blk_0: { | 6057 | return blk_0: { |
| 4805 | const pos_0 = p.i; | 6058 | const pos_0 = p.i; |
| 4806 | if (try p.parseskip() and blk_1: { | 6059 | if (try p.parseskip() and blk_1: { |
| ... | @@ -4815,6 +6068,10 @@ const Parser = struct { | ... | @@ -4815,6 +6068,10 @@ const Parser = struct { |
| 4815 | }; | 6068 | }; |
| 4816 | } | 6069 | } |
| 4817 | pub fn parseKEYWORD_inline(p: *Parser) Error!bool { | 6070 | pub fn parseKEYWORD_inline(p: *Parser) Error!bool { |
| | 6071 | const def_index = @intFromEnum(Def.defKEYWORD_inline); |
| | 6072 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 6073 | p.depths[def_index] += 1; |
| | 6074 | defer p.depths[def_index] -= 1; |
| 4818 | return blk_0: { | 6075 | return blk_0: { |
| 4819 | const pos_0 = p.i; | 6076 | const pos_0 = p.i; |
| 4820 | if (try p.parseskip() and blk_1: { | 6077 | if (try p.parseskip() and blk_1: { |
| ... | @@ -4829,6 +6086,10 @@ const Parser = struct { | ... | @@ -4829,6 +6086,10 @@ const Parser = struct { |
| 4829 | }; | 6086 | }; |
| 4830 | } | 6087 | } |
| 4831 | pub fn parseKEYWORD_noalias(p: *Parser) Error!bool { | 6088 | pub fn parseKEYWORD_noalias(p: *Parser) Error!bool { |
| | 6089 | const def_index = @intFromEnum(Def.defKEYWORD_noalias); |
| | 6090 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 6091 | p.depths[def_index] += 1; |
| | 6092 | defer p.depths[def_index] -= 1; |
| 4832 | return blk_0: { | 6093 | return blk_0: { |
| 4833 | const pos_0 = p.i; | 6094 | const pos_0 = p.i; |
| 4834 | if (try p.parseskip() and blk_1: { | 6095 | if (try p.parseskip() and blk_1: { |
| ... | @@ -4843,6 +6104,10 @@ const Parser = struct { | ... | @@ -4843,6 +6104,10 @@ const Parser = struct { |
| 4843 | }; | 6104 | }; |
| 4844 | } | 6105 | } |
| 4845 | pub fn parseKEYWORD_nosuspend(p: *Parser) Error!bool { | 6106 | pub fn parseKEYWORD_nosuspend(p: *Parser) Error!bool { |
| | 6107 | const def_index = @intFromEnum(Def.defKEYWORD_nosuspend); |
| | 6108 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 6109 | p.depths[def_index] += 1; |
| | 6110 | defer p.depths[def_index] -= 1; |
| 4846 | return blk_0: { | 6111 | return blk_0: { |
| 4847 | const pos_0 = p.i; | 6112 | const pos_0 = p.i; |
| 4848 | if (try p.parseskip() and blk_1: { | 6113 | if (try p.parseskip() and blk_1: { |
| ... | @@ -4857,6 +6122,10 @@ const Parser = struct { | ... | @@ -4857,6 +6122,10 @@ const Parser = struct { |
| 4857 | }; | 6122 | }; |
| 4858 | } | 6123 | } |
| 4859 | pub fn parseKEYWORD_noinline(p: *Parser) Error!bool { | 6124 | pub fn parseKEYWORD_noinline(p: *Parser) Error!bool { |
| | 6125 | const def_index = @intFromEnum(Def.defKEYWORD_noinline); |
| | 6126 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 6127 | p.depths[def_index] += 1; |
| | 6128 | defer p.depths[def_index] -= 1; |
| 4860 | return blk_0: { | 6129 | return blk_0: { |
| 4861 | const pos_0 = p.i; | 6130 | const pos_0 = p.i; |
| 4862 | if (try p.parseskip() and blk_1: { | 6131 | if (try p.parseskip() and blk_1: { |
| ... | @@ -4871,6 +6140,10 @@ const Parser = struct { | ... | @@ -4871,6 +6140,10 @@ const Parser = struct { |
| 4871 | }; | 6140 | }; |
| 4872 | } | 6141 | } |
| 4873 | pub fn parseKEYWORD_opaque(p: *Parser) Error!bool { | 6142 | pub fn parseKEYWORD_opaque(p: *Parser) Error!bool { |
| | 6143 | const def_index = @intFromEnum(Def.defKEYWORD_opaque); |
| | 6144 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 6145 | p.depths[def_index] += 1; |
| | 6146 | defer p.depths[def_index] -= 1; |
| 4874 | return blk_0: { | 6147 | return blk_0: { |
| 4875 | const pos_0 = p.i; | 6148 | const pos_0 = p.i; |
| 4876 | if (try p.parseskip() and blk_1: { | 6149 | if (try p.parseskip() and blk_1: { |
| ... | @@ -4885,6 +6158,10 @@ const Parser = struct { | ... | @@ -4885,6 +6158,10 @@ const Parser = struct { |
| 4885 | }; | 6158 | }; |
| 4886 | } | 6159 | } |
| 4887 | pub fn parseKEYWORD_or(p: *Parser) Error!bool { | 6160 | pub fn parseKEYWORD_or(p: *Parser) Error!bool { |
| | 6161 | const def_index = @intFromEnum(Def.defKEYWORD_or); |
| | 6162 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 6163 | p.depths[def_index] += 1; |
| | 6164 | defer p.depths[def_index] -= 1; |
| 4888 | return blk_0: { | 6165 | return blk_0: { |
| 4889 | const pos_0 = p.i; | 6166 | const pos_0 = p.i; |
| 4890 | if (try p.parseskip() and blk_1: { | 6167 | if (try p.parseskip() and blk_1: { |
| ... | @@ -4899,6 +6176,10 @@ const Parser = struct { | ... | @@ -4899,6 +6176,10 @@ const Parser = struct { |
| 4899 | }; | 6176 | }; |
| 4900 | } | 6177 | } |
| 4901 | pub fn parseKEYWORD_orelse(p: *Parser) Error!bool { | 6178 | pub fn parseKEYWORD_orelse(p: *Parser) Error!bool { |
| | 6179 | const def_index = @intFromEnum(Def.defKEYWORD_orelse); |
| | 6180 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 6181 | p.depths[def_index] += 1; |
| | 6182 | defer p.depths[def_index] -= 1; |
| 4902 | return blk_0: { | 6183 | return blk_0: { |
| 4903 | const pos_0 = p.i; | 6184 | const pos_0 = p.i; |
| 4904 | if (try p.parseskip() and blk_1: { | 6185 | if (try p.parseskip() and blk_1: { |
| ... | @@ -4913,6 +6194,10 @@ const Parser = struct { | ... | @@ -4913,6 +6194,10 @@ const Parser = struct { |
| 4913 | }; | 6194 | }; |
| 4914 | } | 6195 | } |
| 4915 | pub fn parseKEYWORD_packed(p: *Parser) Error!bool { | 6196 | pub fn parseKEYWORD_packed(p: *Parser) Error!bool { |
| | 6197 | const def_index = @intFromEnum(Def.defKEYWORD_packed); |
| | 6198 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 6199 | p.depths[def_index] += 1; |
| | 6200 | defer p.depths[def_index] -= 1; |
| 4916 | return blk_0: { | 6201 | return blk_0: { |
| 4917 | const pos_0 = p.i; | 6202 | const pos_0 = p.i; |
| 4918 | if (try p.parseskip() and blk_1: { | 6203 | if (try p.parseskip() and blk_1: { |
| ... | @@ -4927,6 +6212,10 @@ const Parser = struct { | ... | @@ -4927,6 +6212,10 @@ const Parser = struct { |
| 4927 | }; | 6212 | }; |
| 4928 | } | 6213 | } |
| 4929 | pub fn parseKEYWORD_pub(p: *Parser) Error!bool { | 6214 | pub fn parseKEYWORD_pub(p: *Parser) Error!bool { |
| | 6215 | const def_index = @intFromEnum(Def.defKEYWORD_pub); |
| | 6216 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 6217 | p.depths[def_index] += 1; |
| | 6218 | defer p.depths[def_index] -= 1; |
| 4930 | return blk_0: { | 6219 | return blk_0: { |
| 4931 | const pos_0 = p.i; | 6220 | const pos_0 = p.i; |
| 4932 | if (try p.parseskip() and blk_1: { | 6221 | if (try p.parseskip() and blk_1: { |
| ... | @@ -4941,6 +6230,10 @@ const Parser = struct { | ... | @@ -4941,6 +6230,10 @@ const Parser = struct { |
| 4941 | }; | 6230 | }; |
| 4942 | } | 6231 | } |
| 4943 | pub fn parseKEYWORD_resume(p: *Parser) Error!bool { | 6232 | pub fn parseKEYWORD_resume(p: *Parser) Error!bool { |
| | 6233 | const def_index = @intFromEnum(Def.defKEYWORD_resume); |
| | 6234 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 6235 | p.depths[def_index] += 1; |
| | 6236 | defer p.depths[def_index] -= 1; |
| 4944 | return blk_0: { | 6237 | return blk_0: { |
| 4945 | const pos_0 = p.i; | 6238 | const pos_0 = p.i; |
| 4946 | if (try p.parseskip() and blk_1: { | 6239 | if (try p.parseskip() and blk_1: { |
| ... | @@ -4955,6 +6248,10 @@ const Parser = struct { | ... | @@ -4955,6 +6248,10 @@ const Parser = struct { |
| 4955 | }; | 6248 | }; |
| 4956 | } | 6249 | } |
| 4957 | pub fn parseKEYWORD_return(p: *Parser) Error!bool { | 6250 | pub fn parseKEYWORD_return(p: *Parser) Error!bool { |
| | 6251 | const def_index = @intFromEnum(Def.defKEYWORD_return); |
| | 6252 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 6253 | p.depths[def_index] += 1; |
| | 6254 | defer p.depths[def_index] -= 1; |
| 4958 | return blk_0: { | 6255 | return blk_0: { |
| 4959 | const pos_0 = p.i; | 6256 | const pos_0 = p.i; |
| 4960 | if (try p.parseskip() and blk_1: { | 6257 | if (try p.parseskip() and blk_1: { |
| ... | @@ -4969,6 +6266,10 @@ const Parser = struct { | ... | @@ -4969,6 +6266,10 @@ const Parser = struct { |
| 4969 | }; | 6266 | }; |
| 4970 | } | 6267 | } |
| 4971 | pub fn parseKEYWORD_linksection(p: *Parser) Error!bool { | 6268 | pub fn parseKEYWORD_linksection(p: *Parser) Error!bool { |
| | 6269 | const def_index = @intFromEnum(Def.defKEYWORD_linksection); |
| | 6270 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 6271 | p.depths[def_index] += 1; |
| | 6272 | defer p.depths[def_index] -= 1; |
| 4972 | return blk_0: { | 6273 | return blk_0: { |
| 4973 | const pos_0 = p.i; | 6274 | const pos_0 = p.i; |
| 4974 | if (try p.parseskip() and blk_1: { | 6275 | if (try p.parseskip() and blk_1: { |
| ... | @@ -4983,6 +6284,10 @@ const Parser = struct { | ... | @@ -4983,6 +6284,10 @@ const Parser = struct { |
| 4983 | }; | 6284 | }; |
| 4984 | } | 6285 | } |
| 4985 | pub fn parseKEYWORD_struct(p: *Parser) Error!bool { | 6286 | pub fn parseKEYWORD_struct(p: *Parser) Error!bool { |
| | 6287 | const def_index = @intFromEnum(Def.defKEYWORD_struct); |
| | 6288 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 6289 | p.depths[def_index] += 1; |
| | 6290 | defer p.depths[def_index] -= 1; |
| 4986 | return blk_0: { | 6291 | return blk_0: { |
| 4987 | const pos_0 = p.i; | 6292 | const pos_0 = p.i; |
| 4988 | if (try p.parseskip() and blk_1: { | 6293 | if (try p.parseskip() and blk_1: { |
| ... | @@ -4997,6 +6302,10 @@ const Parser = struct { | ... | @@ -4997,6 +6302,10 @@ const Parser = struct { |
| 4997 | }; | 6302 | }; |
| 4998 | } | 6303 | } |
| 4999 | pub fn parseKEYWORD_suspend(p: *Parser) Error!bool { | 6304 | pub fn parseKEYWORD_suspend(p: *Parser) Error!bool { |
| | 6305 | const def_index = @intFromEnum(Def.defKEYWORD_suspend); |
| | 6306 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 6307 | p.depths[def_index] += 1; |
| | 6308 | defer p.depths[def_index] -= 1; |
| 5000 | return blk_0: { | 6309 | return blk_0: { |
| 5001 | const pos_0 = p.i; | 6310 | const pos_0 = p.i; |
| 5002 | if (try p.parseskip() and blk_1: { | 6311 | if (try p.parseskip() and blk_1: { |
| ... | @@ -5011,6 +6320,10 @@ const Parser = struct { | ... | @@ -5011,6 +6320,10 @@ const Parser = struct { |
| 5011 | }; | 6320 | }; |
| 5012 | } | 6321 | } |
| 5013 | pub fn parseKEYWORD_switch(p: *Parser) Error!bool { | 6322 | pub fn parseKEYWORD_switch(p: *Parser) Error!bool { |
| | 6323 | const def_index = @intFromEnum(Def.defKEYWORD_switch); |
| | 6324 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 6325 | p.depths[def_index] += 1; |
| | 6326 | defer p.depths[def_index] -= 1; |
| 5014 | return blk_0: { | 6327 | return blk_0: { |
| 5015 | const pos_0 = p.i; | 6328 | const pos_0 = p.i; |
| 5016 | if (try p.parseskip() and blk_1: { | 6329 | if (try p.parseskip() and blk_1: { |
| ... | @@ -5025,6 +6338,10 @@ const Parser = struct { | ... | @@ -5025,6 +6338,10 @@ const Parser = struct { |
| 5025 | }; | 6338 | }; |
| 5026 | } | 6339 | } |
| 5027 | pub fn parseKEYWORD_test(p: *Parser) Error!bool { | 6340 | pub fn parseKEYWORD_test(p: *Parser) Error!bool { |
| | 6341 | const def_index = @intFromEnum(Def.defKEYWORD_test); |
| | 6342 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 6343 | p.depths[def_index] += 1; |
| | 6344 | defer p.depths[def_index] -= 1; |
| 5028 | return blk_0: { | 6345 | return blk_0: { |
| 5029 | const pos_0 = p.i; | 6346 | const pos_0 = p.i; |
| 5030 | if (try p.parseskip() and blk_1: { | 6347 | if (try p.parseskip() and blk_1: { |
| ... | @@ -5039,6 +6356,10 @@ const Parser = struct { | ... | @@ -5039,6 +6356,10 @@ const Parser = struct { |
| 5039 | }; | 6356 | }; |
| 5040 | } | 6357 | } |
| 5041 | pub fn parseKEYWORD_threadlocal(p: *Parser) Error!bool { | 6358 | pub fn parseKEYWORD_threadlocal(p: *Parser) Error!bool { |
| | 6359 | const def_index = @intFromEnum(Def.defKEYWORD_threadlocal); |
| | 6360 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 6361 | p.depths[def_index] += 1; |
| | 6362 | defer p.depths[def_index] -= 1; |
| 5042 | return blk_0: { | 6363 | return blk_0: { |
| 5043 | const pos_0 = p.i; | 6364 | const pos_0 = p.i; |
| 5044 | if (try p.parseskip() and blk_1: { | 6365 | if (try p.parseskip() and blk_1: { |
| ... | @@ -5053,6 +6374,10 @@ const Parser = struct { | ... | @@ -5053,6 +6374,10 @@ const Parser = struct { |
| 5053 | }; | 6374 | }; |
| 5054 | } | 6375 | } |
| 5055 | pub fn parseKEYWORD_try(p: *Parser) Error!bool { | 6376 | pub fn parseKEYWORD_try(p: *Parser) Error!bool { |
| | 6377 | const def_index = @intFromEnum(Def.defKEYWORD_try); |
| | 6378 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 6379 | p.depths[def_index] += 1; |
| | 6380 | defer p.depths[def_index] -= 1; |
| 5056 | return blk_0: { | 6381 | return blk_0: { |
| 5057 | const pos_0 = p.i; | 6382 | const pos_0 = p.i; |
| 5058 | if (try p.parseskip() and blk_1: { | 6383 | if (try p.parseskip() and blk_1: { |
| ... | @@ -5067,6 +6392,10 @@ const Parser = struct { | ... | @@ -5067,6 +6392,10 @@ const Parser = struct { |
| 5067 | }; | 6392 | }; |
| 5068 | } | 6393 | } |
| 5069 | pub fn parseKEYWORD_union(p: *Parser) Error!bool { | 6394 | pub fn parseKEYWORD_union(p: *Parser) Error!bool { |
| | 6395 | const def_index = @intFromEnum(Def.defKEYWORD_union); |
| | 6396 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 6397 | p.depths[def_index] += 1; |
| | 6398 | defer p.depths[def_index] -= 1; |
| 5070 | return blk_0: { | 6399 | return blk_0: { |
| 5071 | const pos_0 = p.i; | 6400 | const pos_0 = p.i; |
| 5072 | if (try p.parseskip() and blk_1: { | 6401 | if (try p.parseskip() and blk_1: { |
| ... | @@ -5081,6 +6410,10 @@ const Parser = struct { | ... | @@ -5081,6 +6410,10 @@ const Parser = struct { |
| 5081 | }; | 6410 | }; |
| 5082 | } | 6411 | } |
| 5083 | pub fn parseKEYWORD_unreachable(p: *Parser) Error!bool { | 6412 | pub fn parseKEYWORD_unreachable(p: *Parser) Error!bool { |
| | 6413 | const def_index = @intFromEnum(Def.defKEYWORD_unreachable); |
| | 6414 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 6415 | p.depths[def_index] += 1; |
| | 6416 | defer p.depths[def_index] -= 1; |
| 5084 | return blk_0: { | 6417 | return blk_0: { |
| 5085 | const pos_0 = p.i; | 6418 | const pos_0 = p.i; |
| 5086 | if (try p.parseskip() and blk_1: { | 6419 | if (try p.parseskip() and blk_1: { |
| ... | @@ -5095,6 +6428,10 @@ const Parser = struct { | ... | @@ -5095,6 +6428,10 @@ const Parser = struct { |
| 5095 | }; | 6428 | }; |
| 5096 | } | 6429 | } |
| 5097 | pub fn parseKEYWORD_var(p: *Parser) Error!bool { | 6430 | pub fn parseKEYWORD_var(p: *Parser) Error!bool { |
| | 6431 | const def_index = @intFromEnum(Def.defKEYWORD_var); |
| | 6432 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 6433 | p.depths[def_index] += 1; |
| | 6434 | defer p.depths[def_index] -= 1; |
| 5098 | return blk_0: { | 6435 | return blk_0: { |
| 5099 | const pos_0 = p.i; | 6436 | const pos_0 = p.i; |
| 5100 | if (try p.parseskip() and blk_1: { | 6437 | if (try p.parseskip() and blk_1: { |
| ... | @@ -5109,6 +6446,10 @@ const Parser = struct { | ... | @@ -5109,6 +6446,10 @@ const Parser = struct { |
| 5109 | }; | 6446 | }; |
| 5110 | } | 6447 | } |
| 5111 | pub fn parseKEYWORD_volatile(p: *Parser) Error!bool { | 6448 | pub fn parseKEYWORD_volatile(p: *Parser) Error!bool { |
| | 6449 | const def_index = @intFromEnum(Def.defKEYWORD_volatile); |
| | 6450 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 6451 | p.depths[def_index] += 1; |
| | 6452 | defer p.depths[def_index] -= 1; |
| 5112 | return blk_0: { | 6453 | return blk_0: { |
| 5113 | const pos_0 = p.i; | 6454 | const pos_0 = p.i; |
| 5114 | if (try p.parseskip() and blk_1: { | 6455 | if (try p.parseskip() and blk_1: { |
| ... | @@ -5123,6 +6464,10 @@ const Parser = struct { | ... | @@ -5123,6 +6464,10 @@ const Parser = struct { |
| 5123 | }; | 6464 | }; |
| 5124 | } | 6465 | } |
| 5125 | pub fn parseKEYWORD_while(p: *Parser) Error!bool { | 6466 | pub fn parseKEYWORD_while(p: *Parser) Error!bool { |
| | 6467 | const def_index = @intFromEnum(Def.defKEYWORD_while); |
| | 6468 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 6469 | p.depths[def_index] += 1; |
| | 6470 | defer p.depths[def_index] -= 1; |
| 5126 | return blk_0: { | 6471 | return blk_0: { |
| 5127 | const pos_0 = p.i; | 6472 | const pos_0 = p.i; |
| 5128 | if (try p.parseskip() and blk_1: { | 6473 | if (try p.parseskip() and blk_1: { |
| ... | @@ -5137,6 +6482,10 @@ const Parser = struct { | ... | @@ -5137,6 +6482,10 @@ const Parser = struct { |
| 5137 | }; | 6482 | }; |
| 5138 | } | 6483 | } |
| 5139 | pub fn parsekeyword(p: *Parser) Error!bool { | 6484 | pub fn parsekeyword(p: *Parser) Error!bool { |
| | 6485 | const def_index = @intFromEnum(Def.defkeyword); |
| | 6486 | if (p.depths[def_index] > max_depth) return error.MaxDepth; |
| | 6487 | p.depths[def_index] += 1; |
| | 6488 | defer p.depths[def_index] -= 1; |
| 5140 | return blk_0: { | 6489 | return blk_0: { |
| 5141 | const pos_0 = p.i; | 6490 | const pos_0 = p.i; |
| 5142 | if (try p.parseKEYWORD_addrspace()) break :blk_0 true; | 6491 | if (try p.parseKEYWORD_addrspace()) break :blk_0 true; |